##// END OF EJS Templates
blackbox: log working directory version...
timeless -
r28245:caa2a0c6 default
parent child Browse files
Show More
@@ -1,187 +1,205 b''
1 # blackbox.py - log repository events to a file for post-mortem debugging
1 # blackbox.py - log repository events to a file for post-mortem debugging
2 #
2 #
3 # Copyright 2010 Nicolas Dumazet
3 # Copyright 2010 Nicolas Dumazet
4 # Copyright 2013 Facebook, Inc.
4 # Copyright 2013 Facebook, Inc.
5 #
5 #
6 # This software may be used and distributed according to the terms of the
6 # This software may be used and distributed according to the terms of the
7 # GNU General Public License version 2 or any later version.
7 # GNU General Public License version 2 or any later version.
8
8
9 """log repository events to a blackbox for debugging
9 """log repository events to a blackbox for debugging
10
10
11 Logs event information to .hg/blackbox.log to help debug and diagnose problems.
11 Logs event information to .hg/blackbox.log to help debug and diagnose problems.
12 The events that get logged can be configured via the blackbox.track config key.
12 The events that get logged can be configured via the blackbox.track config key.
13 Examples::
13 Examples::
14
14
15 [blackbox]
15 [blackbox]
16 track = *
16 track = *
17
17
18 [blackbox]
18 [blackbox]
19 track = command, commandfinish, commandexception, exthook, pythonhook
19 track = command, commandfinish, commandexception, exthook, pythonhook
20
20
21 [blackbox]
21 [blackbox]
22 track = incoming
22 track = incoming
23
23
24 [blackbox]
24 [blackbox]
25 # limit the size of a log file
25 # limit the size of a log file
26 maxsize = 1.5 MB
26 maxsize = 1.5 MB
27 # rotate up to N log files when the current one gets too big
27 # rotate up to N log files when the current one gets too big
28 maxfiles = 3
28 maxfiles = 3
29
29
30 """
30 """
31
31
32 from __future__ import absolute_import
32 from __future__ import absolute_import
33
33
34 import errno
34 import errno
35 import re
35 import re
36
36
37 from mercurial.i18n import _
37 from mercurial.i18n import _
38 from mercurial.node import hex
39
38 from mercurial import (
40 from mercurial import (
39 cmdutil,
41 cmdutil,
40 util,
42 util,
41 )
43 )
42
44
43 cmdtable = {}
45 cmdtable = {}
44 command = cmdutil.command(cmdtable)
46 command = cmdutil.command(cmdtable)
45 # Note for extension authors: ONLY specify testedwith = 'internal' for
47 # Note for extension authors: ONLY specify testedwith = 'internal' for
46 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
48 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
47 # be specifying the version(s) of Mercurial they are tested with, or
49 # be specifying the version(s) of Mercurial they are tested with, or
48 # leave the attribute unspecified.
50 # leave the attribute unspecified.
49 testedwith = 'internal'
51 testedwith = 'internal'
50 lastfp = None
52 lastfp = None
51
53
52 filehandles = {}
54 filehandles = {}
53
55
54 def _openlog(vfs):
56 def _openlog(vfs):
55 path = vfs.join('blackbox.log')
57 path = vfs.join('blackbox.log')
56 if path in filehandles:
58 if path in filehandles:
57 return filehandles[path]
59 return filehandles[path]
58 filehandles[path] = fp = vfs('blackbox.log', 'a')
60 filehandles[path] = fp = vfs('blackbox.log', 'a')
59 return fp
61 return fp
60
62
61 def _closelog(vfs):
63 def _closelog(vfs):
62 path = vfs.join('blackbox.log')
64 path = vfs.join('blackbox.log')
63 fp = filehandles[path]
65 fp = filehandles[path]
64 del filehandles[path]
66 del filehandles[path]
65 fp.close()
67 fp.close()
66
68
69 def hexfn(node):
70 if node is None:
71 return None
72 else:
73 return hex(node)
74
67 def wrapui(ui):
75 def wrapui(ui):
68 class blackboxui(ui.__class__):
76 class blackboxui(ui.__class__):
69 @util.propertycache
77 @util.propertycache
70 def track(self):
78 def track(self):
71 return self.configlist('blackbox', 'track', ['*'])
79 return self.configlist('blackbox', 'track', ['*'])
72
80
73 def _openlogfile(self):
81 def _openlogfile(self):
74 def rotate(oldpath, newpath):
82 def rotate(oldpath, newpath):
75 try:
83 try:
76 self._bbvfs.unlink(newpath)
84 self._bbvfs.unlink(newpath)
77 except OSError as err:
85 except OSError as err:
78 if err.errno != errno.ENOENT:
86 if err.errno != errno.ENOENT:
79 self.debug("warning: cannot remove '%s': %s\n" %
87 self.debug("warning: cannot remove '%s': %s\n" %
80 (newpath, err.strerror))
88 (newpath, err.strerror))
81 try:
89 try:
82 if newpath:
90 if newpath:
83 self._bbvfs.rename(oldpath, newpath)
91 self._bbvfs.rename(oldpath, newpath)
84 except OSError as err:
92 except OSError as err:
85 if err.errno != errno.ENOENT:
93 if err.errno != errno.ENOENT:
86 self.debug("warning: cannot rename '%s' to '%s': %s\n" %
94 self.debug("warning: cannot rename '%s' to '%s': %s\n" %
87 (newpath, oldpath, err.strerror))
95 (newpath, oldpath, err.strerror))
88
96
89 fp = _openlog(self._bbvfs)
97 fp = _openlog(self._bbvfs)
90 maxsize = self.configbytes('blackbox', 'maxsize', 1048576)
98 maxsize = self.configbytes('blackbox', 'maxsize', 1048576)
91 if maxsize > 0:
99 if maxsize > 0:
92 st = self._bbvfs.fstat(fp)
100 st = self._bbvfs.fstat(fp)
93 if st.st_size >= maxsize:
101 if st.st_size >= maxsize:
94 path = fp.name
102 path = fp.name
95 _closelog(self._bbvfs)
103 _closelog(self._bbvfs)
96 maxfiles = self.configint('blackbox', 'maxfiles', 7)
104 maxfiles = self.configint('blackbox', 'maxfiles', 7)
97 for i in xrange(maxfiles - 1, 1, -1):
105 for i in xrange(maxfiles - 1, 1, -1):
98 rotate(oldpath='%s.%d' % (path, i - 1),
106 rotate(oldpath='%s.%d' % (path, i - 1),
99 newpath='%s.%d' % (path, i))
107 newpath='%s.%d' % (path, i))
100 rotate(oldpath=path,
108 rotate(oldpath=path,
101 newpath=maxfiles > 0 and path + '.1')
109 newpath=maxfiles > 0 and path + '.1')
102 fp = _openlog(self._bbvfs)
110 fp = _openlog(self._bbvfs)
103 return fp
111 return fp
104
112
105 def log(self, event, *msg, **opts):
113 def log(self, event, *msg, **opts):
106 global lastfp
114 global lastfp
107 super(blackboxui, self).log(event, *msg, **opts)
115 super(blackboxui, self).log(event, *msg, **opts)
108
116
109 if not '*' in self.track and not event in self.track:
117 if not '*' in self.track and not event in self.track:
110 return
118 return
111
119
112 if util.safehasattr(self, '_blackbox'):
120 if util.safehasattr(self, '_blackbox'):
113 fp = self._blackbox
121 fp = self._blackbox
114 elif util.safehasattr(self, '_bbvfs'):
122 elif util.safehasattr(self, '_bbvfs'):
115 try:
123 try:
116 self._bbfp = self._openlogfile()
124 self._bbfp = self._openlogfile()
117 except (IOError, OSError) as err:
125 except (IOError, OSError) as err:
118 self.debug('warning: cannot write to blackbox.log: %s\n' %
126 self.debug('warning: cannot write to blackbox.log: %s\n' %
119 err.strerror)
127 err.strerror)
120 del self._bbvfs
128 del self._bbvfs
121 self._bbfp = None
129 self._bbfp = None
122 fp = self._bbfp
130 fp = self._bbfp
123 else:
131 else:
124 # certain ui instances exist outside the context of
132 # certain ui instances exist outside the context of
125 # a repo, so just default to the last blackbox that
133 # a repo, so just default to the last blackbox that
126 # was seen.
134 # was seen.
127 fp = lastfp
135 fp = lastfp
128
136
129 if fp:
137 if fp:
130 date = util.datestr(None, '%Y/%m/%d %H:%M:%S')
138 date = util.datestr(None, '%Y/%m/%d %H:%M:%S')
131 user = util.getuser()
139 user = util.getuser()
132 pid = str(util.getpid())
140 pid = str(util.getpid())
133 formattedmsg = msg[0] % msg[1:]
141 formattedmsg = msg[0] % msg[1:]
142 rev = '(unknown)'
143 if util.safehasattr(self, '_bbrepo'):
144 ctx = self._bbrepo[None]
145 if ctx.rev() is not None:
146 rev = hexfn(ctx.node())
147 else:
148 parents = ctx.parents()
149 rev = ('+'.join([hexfn(p.node()) for p in parents]))
134 try:
150 try:
135 fp.write('%s %s (%s)> %s' %
151 fp.write('%s %s @%s (%s)> %s' %
136 (date, user, pid, formattedmsg))
152 (date, user, rev, pid, formattedmsg))
137 fp.flush()
153 fp.flush()
138 except IOError as err:
154 except IOError as err:
139 self.debug('warning: cannot write to blackbox.log: %s\n' %
155 self.debug('warning: cannot write to blackbox.log: %s\n' %
140 err.strerror)
156 err.strerror)
141 lastfp = fp
157 if not lastfp or util.safehasattr(self, '_bbrepo'):
158 lastfp = fp
142
159
143 def setrepo(self, repo):
160 def setrepo(self, repo):
144 self._bbvfs = repo.vfs
161 self._bbvfs = repo.vfs
162 self._bbrepo = repo
145
163
146 ui.__class__ = blackboxui
164 ui.__class__ = blackboxui
147
165
148 def uisetup(ui):
166 def uisetup(ui):
149 wrapui(ui)
167 wrapui(ui)
150
168
151 def reposetup(ui, repo):
169 def reposetup(ui, repo):
152 # During 'hg pull' a httppeer repo is created to represent the remote repo.
170 # During 'hg pull' a httppeer repo is created to represent the remote repo.
153 # It doesn't have a .hg directory to put a blackbox in, so we don't do
171 # It doesn't have a .hg directory to put a blackbox in, so we don't do
154 # the blackbox setup for it.
172 # the blackbox setup for it.
155 if not repo.local():
173 if not repo.local():
156 return
174 return
157
175
158 if util.safehasattr(ui, 'setrepo'):
176 if util.safehasattr(ui, 'setrepo'):
159 ui.setrepo(repo)
177 ui.setrepo(repo)
160
178
161 @command('^blackbox',
179 @command('^blackbox',
162 [('l', 'limit', 10, _('the number of events to show')),
180 [('l', 'limit', 10, _('the number of events to show')),
163 ],
181 ],
164 _('hg blackbox [OPTION]...'))
182 _('hg blackbox [OPTION]...'))
165 def blackbox(ui, repo, *revs, **opts):
183 def blackbox(ui, repo, *revs, **opts):
166 '''view the recent repository events
184 '''view the recent repository events
167 '''
185 '''
168
186
169 if not repo.vfs.exists('blackbox.log'):
187 if not repo.vfs.exists('blackbox.log'):
170 return
188 return
171
189
172 limit = opts.get('limit')
190 limit = opts.get('limit')
173 fp = repo.vfs('blackbox.log', 'r')
191 fp = repo.vfs('blackbox.log', 'r')
174 lines = fp.read().split('\n')
192 lines = fp.read().split('\n')
175
193
176 count = 0
194 count = 0
177 output = []
195 output = []
178 for line in reversed(lines):
196 for line in reversed(lines):
179 if count >= limit:
197 if count >= limit:
180 break
198 break
181
199
182 # count the commands by matching lines like: 2013/01/23 19:13:36 root>
200 # count the commands by matching lines like: 2013/01/23 19:13:36 root>
183 if re.match('^\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} .*> .*', line):
201 if re.match('^\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} .*> .*', line):
184 count += 1
202 count += 1
185 output.append(line)
203 output.append(line)
186
204
187 ui.status('\n'.join(reversed(output)))
205 ui.status('\n'.join(reversed(output)))
@@ -1,186 +1,189 b''
1 setup
1 setup
2 $ cat >> $HGRCPATH <<EOF
2 $ cat >> $HGRCPATH <<EOF
3 > [extensions]
3 > [extensions]
4 > blackbox=
4 > blackbox=
5 > mock=$TESTDIR/mockblackbox.py
5 > mock=$TESTDIR/mockblackbox.py
6 > mq=
6 > mq=
7 > EOF
7 > EOF
8 $ hg init blackboxtest
8 $ hg init blackboxtest
9 $ cd blackboxtest
9 $ cd blackboxtest
10
10
11 command, exit codes, and duration
11 command, exit codes, and duration
12
12
13 $ echo a > a
13 $ echo a > a
14 $ hg add a
14 $ hg add a
15 $ hg id > /dev/null
15 $ hg blackbox
16 $ hg blackbox
16 1970/01/01 00:00:00 bob (5000)> add a
17 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> add a
17 1970/01/01 00:00:00 bob (5000)> add a exited 0 after * seconds (glob)
18 1970/01/01 00:00:00 bob @(unknown) (5000)> add a exited 0 after * seconds (glob)
18 1970/01/01 00:00:00 bob (5000)> blackbox
19 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> id
20 1970/01/01 00:00:00 bob @(unknown) (5000)> id exited 0 after * seconds (glob)
21 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> blackbox
19
22
20 incoming change tracking
23 incoming change tracking
21
24
22 create two heads to verify that we only see one change in the log later
25 create two heads to verify that we only see one change in the log later
23 $ hg commit -ma
26 $ hg commit -ma
24 $ hg up null
27 $ hg up null
25 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
28 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
26 $ echo b > b
29 $ echo b > b
27 $ hg commit -Amb
30 $ hg commit -Amb
28 adding b
31 adding b
29 created new head
32 created new head
30
33
31 clone, commit, pull
34 clone, commit, pull
32 $ hg clone . ../blackboxtest2
35 $ hg clone . ../blackboxtest2
33 updating to branch default
36 updating to branch default
34 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
37 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
35 $ echo c > c
38 $ echo c > c
36 $ hg commit -Amc
39 $ hg commit -Amc
37 adding c
40 adding c
38 $ cd ../blackboxtest2
41 $ cd ../blackboxtest2
39 $ hg pull
42 $ hg pull
40 pulling from $TESTTMP/blackboxtest (glob)
43 pulling from $TESTTMP/blackboxtest (glob)
41 searching for changes
44 searching for changes
42 adding changesets
45 adding changesets
43 adding manifests
46 adding manifests
44 adding file changes
47 adding file changes
45 added 1 changesets with 1 changes to 1 files
48 added 1 changesets with 1 changes to 1 files
46 (run 'hg update' to get a working copy)
49 (run 'hg update' to get a working copy)
47 $ hg blackbox -l 6
50 $ hg blackbox -l 6
48 1970/01/01 00:00:00 bob (5000)> pull
51 1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> pull
49 1970/01/01 00:00:00 bob (5000)> updated served branch cache in * seconds (glob)
52 1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> updated served branch cache in * seconds (glob)
50 1970/01/01 00:00:00 bob (5000)> wrote served branch cache with 1 labels and 2 nodes
53 1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> wrote served branch cache with 1 labels and 2 nodes
51 1970/01/01 00:00:00 bob (5000)> 1 incoming changes - new heads: d02f48003e62
54 1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> 1 incoming changes - new heads: d02f48003e62
52 1970/01/01 00:00:00 bob (5000)> pull exited 0 after * seconds (glob)
55 1970/01/01 00:00:00 bob @(unknown) (5000)> pull exited 0 after * seconds (glob)
53 1970/01/01 00:00:00 bob (5000)> blackbox -l 6
56 1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> blackbox -l 6
54
57
55 we must not cause a failure if we cannot write to the log
58 we must not cause a failure if we cannot write to the log
56
59
57 $ hg rollback
60 $ hg rollback
58 repository tip rolled back to revision 1 (undo pull)
61 repository tip rolled back to revision 1 (undo pull)
59
62
60 $ mv .hg/blackbox.log .hg/blackbox.log-
63 $ mv .hg/blackbox.log .hg/blackbox.log-
61 $ mkdir .hg/blackbox.log
64 $ mkdir .hg/blackbox.log
62 $ hg --debug incoming
65 $ hg --debug incoming
63 warning: cannot write to blackbox.log: * (glob)
66 warning: cannot write to blackbox.log: * (glob)
64 comparing with $TESTTMP/blackboxtest (glob)
67 comparing with $TESTTMP/blackboxtest (glob)
65 query 1; heads
68 query 1; heads
66 searching for changes
69 searching for changes
67 all local heads known remotely
70 all local heads known remotely
68 changeset: 2:d02f48003e62c24e2659d97d30f2a83abe5d5d51
71 changeset: 2:d02f48003e62c24e2659d97d30f2a83abe5d5d51
69 tag: tip
72 tag: tip
70 phase: draft
73 phase: draft
71 parent: 1:6563da9dcf87b1949716e38ff3e3dfaa3198eb06
74 parent: 1:6563da9dcf87b1949716e38ff3e3dfaa3198eb06
72 parent: -1:0000000000000000000000000000000000000000
75 parent: -1:0000000000000000000000000000000000000000
73 manifest: 2:ab9d46b053ebf45b7996f2922b9893ff4b63d892
76 manifest: 2:ab9d46b053ebf45b7996f2922b9893ff4b63d892
74 user: test
77 user: test
75 date: Thu Jan 01 00:00:00 1970 +0000
78 date: Thu Jan 01 00:00:00 1970 +0000
76 files+: c
79 files+: c
77 extra: branch=default
80 extra: branch=default
78 description:
81 description:
79 c
82 c
80
83
81
84
82 $ hg pull
85 $ hg pull
83 pulling from $TESTTMP/blackboxtest (glob)
86 pulling from $TESTTMP/blackboxtest (glob)
84 searching for changes
87 searching for changes
85 adding changesets
88 adding changesets
86 adding manifests
89 adding manifests
87 adding file changes
90 adding file changes
88 added 1 changesets with 1 changes to 1 files
91 added 1 changesets with 1 changes to 1 files
89 (run 'hg update' to get a working copy)
92 (run 'hg update' to get a working copy)
90
93
91 a failure reading from the log is fatal
94 a failure reading from the log is fatal
92
95
93 $ hg blackbox -l 3
96 $ hg blackbox -l 3
94 abort: *$TESTTMP/blackboxtest2/.hg/blackbox.log* (glob)
97 abort: *$TESTTMP/blackboxtest2/.hg/blackbox.log* (glob)
95 [255]
98 [255]
96
99
97 $ rmdir .hg/blackbox.log
100 $ rmdir .hg/blackbox.log
98 $ mv .hg/blackbox.log- .hg/blackbox.log
101 $ mv .hg/blackbox.log- .hg/blackbox.log
99
102
100 backup bundles get logged
103 backup bundles get logged
101
104
102 $ touch d
105 $ touch d
103 $ hg commit -Amd
106 $ hg commit -Amd
104 adding d
107 adding d
105 created new head
108 created new head
106 $ hg strip tip
109 $ hg strip tip
107 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
110 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
108 saved backup bundle to $TESTTMP/blackboxtest2/.hg/strip-backup/*-backup.hg (glob)
111 saved backup bundle to $TESTTMP/blackboxtest2/.hg/strip-backup/*-backup.hg (glob)
109 $ hg blackbox -l 6
112 $ hg blackbox -l 6
110 1970/01/01 00:00:00 bob (5000)> strip tip
113 1970/01/01 00:00:00 bob @73f6ee326b27d820b0472f1a825e3a50f3dc489b (5000)> strip tip
111 1970/01/01 00:00:00 bob (5000)> saved backup bundle to $TESTTMP/blackboxtest2/.hg/strip-backup/73f6ee326b27-7612e004-backup.hg (glob)
114 1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> saved backup bundle to $TESTTMP/blackboxtest2/.hg/strip-backup/73f6ee326b27-7612e004-backup.hg
112 1970/01/01 00:00:00 bob (5000)> updated base branch cache in * seconds (glob)
115 1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> updated base branch cache in * seconds (glob)
113 1970/01/01 00:00:00 bob (5000)> wrote base branch cache with 1 labels and 2 nodes
116 1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> wrote base branch cache with 1 labels and 2 nodes
114 1970/01/01 00:00:00 bob (5000)> strip tip exited 0 after * seconds (glob)
117 1970/01/01 00:00:00 bob @(unknown) (5000)> strip tip exited 0 after * seconds (glob)
115 1970/01/01 00:00:00 bob (5000)> blackbox -l 6
118 1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> blackbox -l 6
116
119
117 extension and python hooks - use the eol extension for a pythonhook
120 extension and python hooks - use the eol extension for a pythonhook
118
121
119 $ echo '[extensions]' >> .hg/hgrc
122 $ echo '[extensions]' >> .hg/hgrc
120 $ echo 'eol=' >> .hg/hgrc
123 $ echo 'eol=' >> .hg/hgrc
121 $ echo '[hooks]' >> .hg/hgrc
124 $ echo '[hooks]' >> .hg/hgrc
122 $ echo 'update = echo hooked' >> .hg/hgrc
125 $ echo 'update = echo hooked' >> .hg/hgrc
123 $ hg update
126 $ hg update
124 hooked
127 hooked
125 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
128 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
126 1 other heads for branch "default"
129 1 other heads for branch "default"
127 $ hg blackbox -l 6
130 $ hg blackbox -l 6
128 1970/01/01 00:00:00 bob (5000)> update
131 1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> update
129 1970/01/01 00:00:00 bob (5000)> writing .hg/cache/tags2-visible with 0 tags
132 1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> writing .hg/cache/tags2-visible with 0 tags
130 1970/01/01 00:00:00 bob (5000)> pythonhook-preupdate: hgext.eol.preupdate finished in * seconds (glob)
133 1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> pythonhook-preupdate: hgext.eol.preupdate finished in * seconds (glob)
131 1970/01/01 00:00:00 bob (5000)> exthook-update: echo hooked finished in * seconds (glob)
134 1970/01/01 00:00:00 bob @d02f48003e62c24e2659d97d30f2a83abe5d5d51 (5000)> exthook-update: echo hooked finished in * seconds (glob)
132 1970/01/01 00:00:00 bob (5000)> update exited 0 after * seconds (glob)
135 1970/01/01 00:00:00 bob @(unknown) (5000)> update exited 0 after * seconds (glob)
133 1970/01/01 00:00:00 bob (5000)> blackbox -l 6
136 1970/01/01 00:00:00 bob @d02f48003e62c24e2659d97d30f2a83abe5d5d51 (5000)> blackbox -l 6
134
137
135 log rotation
138 log rotation
136
139
137 $ echo '[blackbox]' >> .hg/hgrc
140 $ echo '[blackbox]' >> .hg/hgrc
138 $ echo 'maxsize = 20 b' >> .hg/hgrc
141 $ echo 'maxsize = 20 b' >> .hg/hgrc
139 $ echo 'maxfiles = 3' >> .hg/hgrc
142 $ echo 'maxfiles = 3' >> .hg/hgrc
140 $ hg status
143 $ hg status
141 $ hg status
144 $ hg status
142 $ hg status
145 $ hg status
143 $ hg tip -q
146 $ hg tip -q
144 2:d02f48003e62
147 2:d02f48003e62
145 $ ls .hg/blackbox.log*
148 $ ls .hg/blackbox.log*
146 .hg/blackbox.log
149 .hg/blackbox.log
147 .hg/blackbox.log.1
150 .hg/blackbox.log.1
148 .hg/blackbox.log.2
151 .hg/blackbox.log.2
149 $ cd ..
152 $ cd ..
150
153
151 $ hg init blackboxtest3
154 $ hg init blackboxtest3
152 $ cd blackboxtest3
155 $ cd blackboxtest3
153 $ hg blackbox
156 $ hg blackbox
154 1970/01/01 00:00:00 bob (5000)> blackbox
157 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> blackbox
155 $ mv .hg/blackbox.log .hg/blackbox.log-
158 $ mv .hg/blackbox.log .hg/blackbox.log-
156 $ mkdir .hg/blackbox.log
159 $ mkdir .hg/blackbox.log
157 $ sed -e 's/\(.*test1.*\)/#\1/; s#\(.*commit2.*\)#os.rmdir(".hg/blackbox.log")\nos.rename(".hg/blackbox.log-", ".hg/blackbox.log")\n\1#' $TESTDIR/test-dispatch.py > ../test-dispatch.py
160 $ sed -e 's/\(.*test1.*\)/#\1/; s#\(.*commit2.*\)#os.rmdir(".hg/blackbox.log")\nos.rename(".hg/blackbox.log-", ".hg/blackbox.log")\n\1#' $TESTDIR/test-dispatch.py > ../test-dispatch.py
158 $ python ../test-dispatch.py
161 $ python ../test-dispatch.py
159 running: add foo
162 running: add foo
160 result: 0
163 result: 0
161 running: commit -m commit1 -d 2000-01-01 foo
164 running: commit -m commit1 -d 2000-01-01 foo
162 result: None
165 result: None
163 running: commit -m commit2 -d 2000-01-02 foo
166 running: commit -m commit2 -d 2000-01-02 foo
164 result: None
167 result: None
165 running: log -r 0
168 running: log -r 0
166 changeset: 0:0e4634943879
169 changeset: 0:0e4634943879
167 user: test
170 user: test
168 date: Sat Jan 01 00:00:00 2000 +0000
171 date: Sat Jan 01 00:00:00 2000 +0000
169 summary: commit1
172 summary: commit1
170
173
171 result: None
174 result: None
172 running: log -r tip
175 running: log -r tip
173 changeset: 1:45589e459b2e
176 changeset: 1:45589e459b2e
174 tag: tip
177 tag: tip
175 user: test
178 user: test
176 date: Sun Jan 02 00:00:00 2000 +0000
179 date: Sun Jan 02 00:00:00 2000 +0000
177 summary: commit2
180 summary: commit2
178
181
179 result: None
182 result: None
180 $ hg blackbox
183 $ hg blackbox
181 1970/01/01 00:00:00 bob (5000)> blackbox
184 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> blackbox
182 1970/01/01 00:00:00 bob (5000)> blackbox exited 0 after * seconds (glob)
185 1970/01/01 00:00:00 bob @(unknown) (5000)> blackbox exited 0 after * seconds (glob)
183 1970/01/01 00:00:00 bob (5000)> blackbox
186 1970/01/01 00:00:00 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> blackbox
184
187
185 cleanup
188 cleanup
186 $ cd ..
189 $ cd ..
@@ -1,116 +1,116 b''
1 $ cat >> $HGRCPATH << EOF
1 $ cat >> $HGRCPATH << EOF
2 > [extensions]
2 > [extensions]
3 > blackbox=
3 > blackbox=
4 > rebase=
4 > rebase=
5 > mock=$TESTDIR/mockblackbox.py
5 > mock=$TESTDIR/mockblackbox.py
6 >
6 >
7 > [experimental]
7 > [experimental]
8 > evolution = createmarkers
8 > evolution = createmarkers
9 > EOF
9 > EOF
10
10
11 Create a repo with some tags
11 Create a repo with some tags
12
12
13 $ hg init repo
13 $ hg init repo
14 $ cd repo
14 $ cd repo
15 $ echo initial > foo
15 $ echo initial > foo
16 $ hg -q commit -A -m initial
16 $ hg -q commit -A -m initial
17 $ hg tag -m 'test tag' test1
17 $ hg tag -m 'test tag' test1
18 $ echo first > first
18 $ echo first > first
19 $ hg -q commit -A -m first
19 $ hg -q commit -A -m first
20 $ hg tag -m 'test2 tag' test2
20 $ hg tag -m 'test2 tag' test2
21 $ hg -q up -r 0
21 $ hg -q up -r 0
22 $ echo newhead > newhead
22 $ echo newhead > newhead
23 $ hg commit -A -m newhead
23 $ hg commit -A -m newhead
24 adding newhead
24 adding newhead
25 created new head
25 created new head
26 $ hg tag -m 'test head 2 tag' head2
26 $ hg tag -m 'test head 2 tag' head2
27
27
28 $ hg log -G -T '{rev}:{node|short} {tags} {desc}\n'
28 $ hg log -G -T '{rev}:{node|short} {tags} {desc}\n'
29 @ 5:2942a772f72a tip test head 2 tag
29 @ 5:2942a772f72a tip test head 2 tag
30 |
30 |
31 o 4:042eb6bfcc49 head2 newhead
31 o 4:042eb6bfcc49 head2 newhead
32 |
32 |
33 | o 3:c3cb30f2d2cd test2 tag
33 | o 3:c3cb30f2d2cd test2 tag
34 | |
34 | |
35 | o 2:d75775ffbc6b test2 first
35 | o 2:d75775ffbc6b test2 first
36 | |
36 | |
37 | o 1:5f97d42da03f test tag
37 | o 1:5f97d42da03f test tag
38 |/
38 |/
39 o 0:55482a6fb4b1 test1 initial
39 o 0:55482a6fb4b1 test1 initial
40
40
41
41
42 Trigger tags cache population by doing something that accesses tags info
42 Trigger tags cache population by doing something that accesses tags info
43
43
44 $ hg tags
44 $ hg tags
45 tip 5:2942a772f72a
45 tip 5:2942a772f72a
46 head2 4:042eb6bfcc49
46 head2 4:042eb6bfcc49
47 test2 2:d75775ffbc6b
47 test2 2:d75775ffbc6b
48 test1 0:55482a6fb4b1
48 test1 0:55482a6fb4b1
49
49
50 $ cat .hg/cache/tags2-visible
50 $ cat .hg/cache/tags2-visible
51 5 2942a772f72a444bef4bef13874d515f50fa27b6
51 5 2942a772f72a444bef4bef13874d515f50fa27b6
52 042eb6bfcc4909bad84a1cbf6eb1ddf0ab587d41 head2
52 042eb6bfcc4909bad84a1cbf6eb1ddf0ab587d41 head2
53 55482a6fb4b1881fa8f746fd52cf6f096bb21c89 test1
53 55482a6fb4b1881fa8f746fd52cf6f096bb21c89 test1
54 d75775ffbc6bca1794d300f5571272879bd280da test2
54 d75775ffbc6bca1794d300f5571272879bd280da test2
55
55
56 Hiding a non-tip changeset should change filtered hash and cause tags recompute
56 Hiding a non-tip changeset should change filtered hash and cause tags recompute
57
57
58 $ hg debugobsolete -d '0 0' c3cb30f2d2cd0aae008cc91a07876e3c5131fd22 -u dummyuser
58 $ hg debugobsolete -d '0 0' c3cb30f2d2cd0aae008cc91a07876e3c5131fd22 -u dummyuser
59
59
60 $ hg tags
60 $ hg tags
61 tip 5:2942a772f72a
61 tip 5:2942a772f72a
62 head2 4:042eb6bfcc49
62 head2 4:042eb6bfcc49
63 test1 0:55482a6fb4b1
63 test1 0:55482a6fb4b1
64
64
65 $ cat .hg/cache/tags2-visible
65 $ cat .hg/cache/tags2-visible
66 5 2942a772f72a444bef4bef13874d515f50fa27b6 f34fbc9a9769ba9eff5aff3d008a6b49f85c08b1
66 5 2942a772f72a444bef4bef13874d515f50fa27b6 f34fbc9a9769ba9eff5aff3d008a6b49f85c08b1
67 042eb6bfcc4909bad84a1cbf6eb1ddf0ab587d41 head2
67 042eb6bfcc4909bad84a1cbf6eb1ddf0ab587d41 head2
68 55482a6fb4b1881fa8f746fd52cf6f096bb21c89 test1
68 55482a6fb4b1881fa8f746fd52cf6f096bb21c89 test1
69
69
70 $ hg blackbox -l 5
70 $ hg blackbox -l 5
71 1970/01/01 00:00:00 bob (5000)> tags
71 1970/01/01 00:00:00 bob @2942a772f72a444bef4bef13874d515f50fa27b6 (5000)> tags
72 1970/01/01 00:00:00 bob (5000)> 2/2 cache hits/lookups in * seconds (glob)
72 1970/01/01 00:00:00 bob @2942a772f72a444bef4bef13874d515f50fa27b6 (5000)> 2/2 cache hits/lookups in * seconds (glob)
73 1970/01/01 00:00:00 bob (5000)> writing .hg/cache/tags2-visible with 2 tags
73 1970/01/01 00:00:00 bob @2942a772f72a444bef4bef13874d515f50fa27b6 (5000)> writing .hg/cache/tags2-visible with 2 tags
74 1970/01/01 00:00:00 bob (5000)> tags exited 0 after * seconds (glob)
74 1970/01/01 00:00:00 bob @(unknown) (5000)> tags exited 0 after * seconds (glob)
75 1970/01/01 00:00:00 bob (5000)> blackbox -l 5
75 1970/01/01 00:00:00 bob @2942a772f72a444bef4bef13874d515f50fa27b6 (5000)> blackbox -l 5
76
76
77 Hiding another changeset should cause the filtered hash to change
77 Hiding another changeset should cause the filtered hash to change
78
78
79 $ hg debugobsolete -d '0 0' d75775ffbc6bca1794d300f5571272879bd280da -u dummyuser
79 $ hg debugobsolete -d '0 0' d75775ffbc6bca1794d300f5571272879bd280da -u dummyuser
80 $ hg debugobsolete -d '0 0' 5f97d42da03fd56f3b228b03dfe48af5c0adf75b -u dummyuser
80 $ hg debugobsolete -d '0 0' 5f97d42da03fd56f3b228b03dfe48af5c0adf75b -u dummyuser
81
81
82 $ hg tags
82 $ hg tags
83 tip 5:2942a772f72a
83 tip 5:2942a772f72a
84 head2 4:042eb6bfcc49
84 head2 4:042eb6bfcc49
85
85
86 $ cat .hg/cache/tags2-visible
86 $ cat .hg/cache/tags2-visible
87 5 2942a772f72a444bef4bef13874d515f50fa27b6 2fce1eec33263d08a4d04293960fc73a555230e4
87 5 2942a772f72a444bef4bef13874d515f50fa27b6 2fce1eec33263d08a4d04293960fc73a555230e4
88 042eb6bfcc4909bad84a1cbf6eb1ddf0ab587d41 head2
88 042eb6bfcc4909bad84a1cbf6eb1ddf0ab587d41 head2
89
89
90 $ hg blackbox -l 5
90 $ hg blackbox -l 5
91 1970/01/01 00:00:00 bob (5000)> tags
91 1970/01/01 00:00:00 bob @2942a772f72a444bef4bef13874d515f50fa27b6 (5000)> tags
92 1970/01/01 00:00:00 bob (5000)> 1/1 cache hits/lookups in * seconds (glob)
92 1970/01/01 00:00:00 bob @2942a772f72a444bef4bef13874d515f50fa27b6 (5000)> 1/1 cache hits/lookups in * seconds (glob)
93 1970/01/01 00:00:00 bob (5000)> writing .hg/cache/tags2-visible with 1 tags
93 1970/01/01 00:00:00 bob @2942a772f72a444bef4bef13874d515f50fa27b6 (5000)> writing .hg/cache/tags2-visible with 1 tags
94 1970/01/01 00:00:00 bob (5000)> tags exited 0 after * seconds (glob)
94 1970/01/01 00:00:00 bob @(unknown) (5000)> tags exited 0 after * seconds (glob)
95 1970/01/01 00:00:00 bob (5000)> blackbox -l 5
95 1970/01/01 00:00:00 bob @2942a772f72a444bef4bef13874d515f50fa27b6 (5000)> blackbox -l 5
96
96
97 Resolving tags on an unfiltered repo writes a separate tags cache
97 Resolving tags on an unfiltered repo writes a separate tags cache
98
98
99 $ hg --hidden tags
99 $ hg --hidden tags
100 tip 5:2942a772f72a
100 tip 5:2942a772f72a
101 head2 4:042eb6bfcc49
101 head2 4:042eb6bfcc49
102 test2 2:d75775ffbc6b
102 test2 2:d75775ffbc6b
103 test1 0:55482a6fb4b1
103 test1 0:55482a6fb4b1
104
104
105 $ cat .hg/cache/tags2
105 $ cat .hg/cache/tags2
106 5 2942a772f72a444bef4bef13874d515f50fa27b6
106 5 2942a772f72a444bef4bef13874d515f50fa27b6
107 042eb6bfcc4909bad84a1cbf6eb1ddf0ab587d41 head2
107 042eb6bfcc4909bad84a1cbf6eb1ddf0ab587d41 head2
108 55482a6fb4b1881fa8f746fd52cf6f096bb21c89 test1
108 55482a6fb4b1881fa8f746fd52cf6f096bb21c89 test1
109 d75775ffbc6bca1794d300f5571272879bd280da test2
109 d75775ffbc6bca1794d300f5571272879bd280da test2
110
110
111 $ hg blackbox -l 5
111 $ hg blackbox -l 5
112 1970/01/01 00:00:00 bob (5000)> --hidden tags
112 1970/01/01 00:00:00 bob @2942a772f72a444bef4bef13874d515f50fa27b6 (5000)> --hidden tags
113 1970/01/01 00:00:00 bob (5000)> 2/2 cache hits/lookups in * seconds (glob)
113 1970/01/01 00:00:00 bob @2942a772f72a444bef4bef13874d515f50fa27b6 (5000)> 2/2 cache hits/lookups in * seconds (glob)
114 1970/01/01 00:00:00 bob (5000)> writing .hg/cache/tags2 with 3 tags
114 1970/01/01 00:00:00 bob @2942a772f72a444bef4bef13874d515f50fa27b6 (5000)> writing .hg/cache/tags2 with 3 tags
115 1970/01/01 00:00:00 bob (5000)> --hidden tags exited 0 after * seconds (glob)
115 1970/01/01 00:00:00 bob @(unknown) (5000)> --hidden tags exited 0 after * seconds (glob)
116 1970/01/01 00:00:00 bob (5000)> blackbox -l 5
116 1970/01/01 00:00:00 bob @2942a772f72a444bef4bef13874d515f50fa27b6 (5000)> blackbox -l 5
@@ -1,712 +1,712 b''
1 setup
1 setup
2
2
3 $ cat >> $HGRCPATH << EOF
3 $ cat >> $HGRCPATH << EOF
4 > [extensions]
4 > [extensions]
5 > blackbox=
5 > blackbox=
6 > mock=$TESTDIR/mockblackbox.py
6 > mock=$TESTDIR/mockblackbox.py
7 > EOF
7 > EOF
8
8
9 Helper functions:
9 Helper functions:
10
10
11 $ cacheexists() {
11 $ cacheexists() {
12 > [ -f .hg/cache/tags2-visible ] && echo "tag cache exists" || echo "no tag cache"
12 > [ -f .hg/cache/tags2-visible ] && echo "tag cache exists" || echo "no tag cache"
13 > }
13 > }
14
14
15 $ fnodescacheexists() {
15 $ fnodescacheexists() {
16 > [ -f .hg/cache/hgtagsfnodes1 ] && echo "fnodes cache exists" || echo "no fnodes cache"
16 > [ -f .hg/cache/hgtagsfnodes1 ] && echo "fnodes cache exists" || echo "no fnodes cache"
17 > }
17 > }
18
18
19 $ dumptags() {
19 $ dumptags() {
20 > rev=$1
20 > rev=$1
21 > echo "rev $rev: .hgtags:"
21 > echo "rev $rev: .hgtags:"
22 > hg cat -r$rev .hgtags
22 > hg cat -r$rev .hgtags
23 > }
23 > }
24
24
25 # XXX need to test that the tag cache works when we strip an old head
25 # XXX need to test that the tag cache works when we strip an old head
26 # and add a new one rooted off non-tip: i.e. node and rev of tip are the
26 # and add a new one rooted off non-tip: i.e. node and rev of tip are the
27 # same, but stuff has changed behind tip.
27 # same, but stuff has changed behind tip.
28
28
29 Setup:
29 Setup:
30
30
31 $ hg init t
31 $ hg init t
32 $ cd t
32 $ cd t
33 $ cacheexists
33 $ cacheexists
34 no tag cache
34 no tag cache
35 $ fnodescacheexists
35 $ fnodescacheexists
36 no fnodes cache
36 no fnodes cache
37 $ hg id
37 $ hg id
38 000000000000 tip
38 000000000000 tip
39 $ cacheexists
39 $ cacheexists
40 no tag cache
40 no tag cache
41 $ fnodescacheexists
41 $ fnodescacheexists
42 no fnodes cache
42 no fnodes cache
43 $ echo a > a
43 $ echo a > a
44 $ hg add a
44 $ hg add a
45 $ hg commit -m "test"
45 $ hg commit -m "test"
46 $ hg co
46 $ hg co
47 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
47 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
48 $ hg identify
48 $ hg identify
49 acb14030fe0a tip
49 acb14030fe0a tip
50 $ hg identify -r 'wdir()'
50 $ hg identify -r 'wdir()'
51 acb14030fe0a tip
51 acb14030fe0a tip
52 $ cacheexists
52 $ cacheexists
53 tag cache exists
53 tag cache exists
54 No fnodes cache because .hgtags file doesn't exist
54 No fnodes cache because .hgtags file doesn't exist
55 (this is an implementation detail)
55 (this is an implementation detail)
56 $ fnodescacheexists
56 $ fnodescacheexists
57 no fnodes cache
57 no fnodes cache
58
58
59 Try corrupting the cache
59 Try corrupting the cache
60
60
61 $ printf 'a b' > .hg/cache/tags2-visible
61 $ printf 'a b' > .hg/cache/tags2-visible
62 $ hg identify
62 $ hg identify
63 acb14030fe0a tip
63 acb14030fe0a tip
64 $ cacheexists
64 $ cacheexists
65 tag cache exists
65 tag cache exists
66 $ fnodescacheexists
66 $ fnodescacheexists
67 no fnodes cache
67 no fnodes cache
68 $ hg identify
68 $ hg identify
69 acb14030fe0a tip
69 acb14030fe0a tip
70
70
71 Create local tag with long name:
71 Create local tag with long name:
72
72
73 $ T=`hg identify --debug --id`
73 $ T=`hg identify --debug --id`
74 $ hg tag -l "This is a local tag with a really long name!"
74 $ hg tag -l "This is a local tag with a really long name!"
75 $ hg tags
75 $ hg tags
76 tip 0:acb14030fe0a
76 tip 0:acb14030fe0a
77 This is a local tag with a really long name! 0:acb14030fe0a
77 This is a local tag with a really long name! 0:acb14030fe0a
78 $ rm .hg/localtags
78 $ rm .hg/localtags
79
79
80 Create a tag behind hg's back:
80 Create a tag behind hg's back:
81
81
82 $ echo "$T first" > .hgtags
82 $ echo "$T first" > .hgtags
83 $ cat .hgtags
83 $ cat .hgtags
84 acb14030fe0a21b60322c440ad2d20cf7685a376 first
84 acb14030fe0a21b60322c440ad2d20cf7685a376 first
85 $ hg add .hgtags
85 $ hg add .hgtags
86 $ hg commit -m "add tags"
86 $ hg commit -m "add tags"
87 $ hg tags
87 $ hg tags
88 tip 1:b9154636be93
88 tip 1:b9154636be93
89 first 0:acb14030fe0a
89 first 0:acb14030fe0a
90 $ hg identify
90 $ hg identify
91 b9154636be93 tip
91 b9154636be93 tip
92
92
93 We should have a fnodes cache now that we have a real tag
93 We should have a fnodes cache now that we have a real tag
94 The cache should have an empty entry for rev 0 and a valid entry for rev 1.
94 The cache should have an empty entry for rev 0 and a valid entry for rev 1.
95
95
96
96
97 $ fnodescacheexists
97 $ fnodescacheexists
98 fnodes cache exists
98 fnodes cache exists
99 $ f --size --hexdump .hg/cache/hgtagsfnodes1
99 $ f --size --hexdump .hg/cache/hgtagsfnodes1
100 .hg/cache/hgtagsfnodes1: size=48
100 .hg/cache/hgtagsfnodes1: size=48
101 0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
101 0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
102 0010: ff ff ff ff ff ff ff ff b9 15 46 36 26 b7 b4 a7 |..........F6&...|
102 0010: ff ff ff ff ff ff ff ff b9 15 46 36 26 b7 b4 a7 |..........F6&...|
103 0020: 73 e0 9e e3 c5 2f 51 0e 19 e0 5e 1f f9 66 d8 59 |s..../Q...^..f.Y|
103 0020: 73 e0 9e e3 c5 2f 51 0e 19 e0 5e 1f f9 66 d8 59 |s..../Q...^..f.Y|
104
104
105 Repeat with cold tag cache:
105 Repeat with cold tag cache:
106
106
107 $ rm -f .hg/cache/tags2-visible .hg/cache/hgtagsfnodes1
107 $ rm -f .hg/cache/tags2-visible .hg/cache/hgtagsfnodes1
108 $ hg identify
108 $ hg identify
109 b9154636be93 tip
109 b9154636be93 tip
110
110
111 $ fnodescacheexists
111 $ fnodescacheexists
112 fnodes cache exists
112 fnodes cache exists
113 $ f --size --hexdump .hg/cache/hgtagsfnodes1
113 $ f --size --hexdump .hg/cache/hgtagsfnodes1
114 .hg/cache/hgtagsfnodes1: size=48
114 .hg/cache/hgtagsfnodes1: size=48
115 0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
115 0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
116 0010: ff ff ff ff ff ff ff ff b9 15 46 36 26 b7 b4 a7 |..........F6&...|
116 0010: ff ff ff ff ff ff ff ff b9 15 46 36 26 b7 b4 a7 |..........F6&...|
117 0020: 73 e0 9e e3 c5 2f 51 0e 19 e0 5e 1f f9 66 d8 59 |s..../Q...^..f.Y|
117 0020: 73 e0 9e e3 c5 2f 51 0e 19 e0 5e 1f f9 66 d8 59 |s..../Q...^..f.Y|
118
118
119 And again, but now unable to write tag cache or lock file:
119 And again, but now unable to write tag cache or lock file:
120
120
121 #if unix-permissions
121 #if unix-permissions
122 $ rm -f .hg/cache/tags2-visible .hg/cache/hgtagsfnodes1
122 $ rm -f .hg/cache/tags2-visible .hg/cache/hgtagsfnodes1
123 $ chmod 555 .hg/cache
123 $ chmod 555 .hg/cache
124 $ hg identify
124 $ hg identify
125 b9154636be93 tip
125 b9154636be93 tip
126 $ chmod 755 .hg/cache
126 $ chmod 755 .hg/cache
127
127
128 $ chmod 555 .hg
128 $ chmod 555 .hg
129 $ hg identify
129 $ hg identify
130 b9154636be93 tip
130 b9154636be93 tip
131 $ chmod 755 .hg
131 $ chmod 755 .hg
132 #endif
132 #endif
133
133
134 Tag cache debug info written to blackbox log
134 Tag cache debug info written to blackbox log
135
135
136 $ rm -f .hg/cache/tags2-visible .hg/cache/hgtagsfnodes1
136 $ rm -f .hg/cache/tags2-visible .hg/cache/hgtagsfnodes1
137 $ hg identify
137 $ hg identify
138 b9154636be93 tip
138 b9154636be93 tip
139 $ hg blackbox -l 6
139 $ hg blackbox -l 6
140 1970/01/01 00:00:00 bob (5000)> identify
140 1970/01/01 00:00:00 bob @b9154636be938d3d431e75a7c906504a079bfe07 (5000)> identify
141 1970/01/01 00:00:00 bob (5000)> writing 48 bytes to cache/hgtagsfnodes1
141 1970/01/01 00:00:00 bob @b9154636be938d3d431e75a7c906504a079bfe07 (5000)> writing 48 bytes to cache/hgtagsfnodes1
142 1970/01/01 00:00:00 bob (5000)> 0/1 cache hits/lookups in * seconds (glob)
142 1970/01/01 00:00:00 bob @b9154636be938d3d431e75a7c906504a079bfe07 (5000)> 0/1 cache hits/lookups in * seconds (glob)
143 1970/01/01 00:00:00 bob (5000)> writing .hg/cache/tags2-visible with 1 tags
143 1970/01/01 00:00:00 bob @b9154636be938d3d431e75a7c906504a079bfe07 (5000)> writing .hg/cache/tags2-visible with 1 tags
144 1970/01/01 00:00:00 bob (5000)> identify exited 0 after * seconds (glob)
144 1970/01/01 00:00:00 bob @(unknown) (5000)> identify exited 0 after * seconds (glob)
145 1970/01/01 00:00:00 bob (5000)> blackbox -l 6
145 1970/01/01 00:00:00 bob @b9154636be938d3d431e75a7c906504a079bfe07 (5000)> blackbox -l 6
146
146
147 Failure to acquire lock results in no write
147 Failure to acquire lock results in no write
148
148
149 $ rm -f .hg/cache/tags2-visible .hg/cache/hgtagsfnodes1
149 $ rm -f .hg/cache/tags2-visible .hg/cache/hgtagsfnodes1
150 $ echo 'foo:1' > .hg/wlock
150 $ echo 'foo:1' > .hg/wlock
151 $ hg identify
151 $ hg identify
152 b9154636be93 tip
152 b9154636be93 tip
153 $ hg blackbox -l 6
153 $ hg blackbox -l 6
154 1970/01/01 00:00:00 bob (5000)> identify
154 1970/01/01 00:00:00 bob @b9154636be938d3d431e75a7c906504a079bfe07 (5000)> identify
155 1970/01/01 00:00:00 bob (5000)> not writing .hg/cache/hgtagsfnodes1 because lock cannot be acquired
155 1970/01/01 00:00:00 bob @b9154636be938d3d431e75a7c906504a079bfe07 (5000)> not writing .hg/cache/hgtagsfnodes1 because lock cannot be acquired
156 1970/01/01 00:00:00 bob (5000)> 0/1 cache hits/lookups in * seconds (glob)
156 1970/01/01 00:00:00 bob @b9154636be938d3d431e75a7c906504a079bfe07 (5000)> 0/1 cache hits/lookups in * seconds (glob)
157 1970/01/01 00:00:00 bob (5000)> writing .hg/cache/tags2-visible with 1 tags
157 1970/01/01 00:00:00 bob @b9154636be938d3d431e75a7c906504a079bfe07 (5000)> writing .hg/cache/tags2-visible with 1 tags
158 1970/01/01 00:00:00 bob (5000)> identify exited 0 after * seconds (glob)
158 1970/01/01 00:00:00 bob @(unknown) (5000)> identify exited 0 after * seconds (glob)
159 1970/01/01 00:00:00 bob (5000)> blackbox -l 6
159 1970/01/01 00:00:00 bob @b9154636be938d3d431e75a7c906504a079bfe07 (5000)> blackbox -l 6
160
160
161 $ fnodescacheexists
161 $ fnodescacheexists
162 no fnodes cache
162 no fnodes cache
163
163
164 $ rm .hg/wlock
164 $ rm .hg/wlock
165
165
166 $ rm -f .hg/cache/tags2-visible .hg/cache/hgtagsfnodes1
166 $ rm -f .hg/cache/tags2-visible .hg/cache/hgtagsfnodes1
167 $ hg identify
167 $ hg identify
168 b9154636be93 tip
168 b9154636be93 tip
169
169
170 Create a branch:
170 Create a branch:
171
171
172 $ echo bb > a
172 $ echo bb > a
173 $ hg status
173 $ hg status
174 M a
174 M a
175 $ hg identify
175 $ hg identify
176 b9154636be93+ tip
176 b9154636be93+ tip
177 $ hg co first
177 $ hg co first
178 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
178 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
179 $ hg id
179 $ hg id
180 acb14030fe0a+ first
180 acb14030fe0a+ first
181 $ hg id -r 'wdir()'
181 $ hg id -r 'wdir()'
182 acb14030fe0a+ first
182 acb14030fe0a+ first
183 $ hg -v id
183 $ hg -v id
184 acb14030fe0a+ first
184 acb14030fe0a+ first
185 $ hg status
185 $ hg status
186 M a
186 M a
187 $ echo 1 > b
187 $ echo 1 > b
188 $ hg add b
188 $ hg add b
189 $ hg commit -m "branch"
189 $ hg commit -m "branch"
190 created new head
190 created new head
191
191
192 Creating a new commit shouldn't append the .hgtags fnodes cache until
192 Creating a new commit shouldn't append the .hgtags fnodes cache until
193 tags info is accessed
193 tags info is accessed
194
194
195 $ f --size --hexdump .hg/cache/hgtagsfnodes1
195 $ f --size --hexdump .hg/cache/hgtagsfnodes1
196 .hg/cache/hgtagsfnodes1: size=48
196 .hg/cache/hgtagsfnodes1: size=48
197 0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
197 0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
198 0010: ff ff ff ff ff ff ff ff b9 15 46 36 26 b7 b4 a7 |..........F6&...|
198 0010: ff ff ff ff ff ff ff ff b9 15 46 36 26 b7 b4 a7 |..........F6&...|
199 0020: 73 e0 9e e3 c5 2f 51 0e 19 e0 5e 1f f9 66 d8 59 |s..../Q...^..f.Y|
199 0020: 73 e0 9e e3 c5 2f 51 0e 19 e0 5e 1f f9 66 d8 59 |s..../Q...^..f.Y|
200
200
201 $ hg id
201 $ hg id
202 c8edf04160c7 tip
202 c8edf04160c7 tip
203
203
204 First 4 bytes of record 3 are changeset fragment
204 First 4 bytes of record 3 are changeset fragment
205
205
206 $ f --size --hexdump .hg/cache/hgtagsfnodes1
206 $ f --size --hexdump .hg/cache/hgtagsfnodes1
207 .hg/cache/hgtagsfnodes1: size=72
207 .hg/cache/hgtagsfnodes1: size=72
208 0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
208 0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
209 0010: ff ff ff ff ff ff ff ff b9 15 46 36 26 b7 b4 a7 |..........F6&...|
209 0010: ff ff ff ff ff ff ff ff b9 15 46 36 26 b7 b4 a7 |..........F6&...|
210 0020: 73 e0 9e e3 c5 2f 51 0e 19 e0 5e 1f f9 66 d8 59 |s..../Q...^..f.Y|
210 0020: 73 e0 9e e3 c5 2f 51 0e 19 e0 5e 1f f9 66 d8 59 |s..../Q...^..f.Y|
211 0030: c8 ed f0 41 00 00 00 00 00 00 00 00 00 00 00 00 |...A............|
211 0030: c8 ed f0 41 00 00 00 00 00 00 00 00 00 00 00 00 |...A............|
212 0040: 00 00 00 00 00 00 00 00 |........|
212 0040: 00 00 00 00 00 00 00 00 |........|
213
213
214 Merge the two heads:
214 Merge the two heads:
215
215
216 $ hg merge 1
216 $ hg merge 1
217 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
217 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
218 (branch merge, don't forget to commit)
218 (branch merge, don't forget to commit)
219 $ hg id
219 $ hg id
220 c8edf04160c7+b9154636be93+ tip
220 c8edf04160c7+b9154636be93+ tip
221 $ hg status
221 $ hg status
222 M .hgtags
222 M .hgtags
223 $ hg commit -m "merge"
223 $ hg commit -m "merge"
224
224
225 Create a fake head, make sure tag not visible afterwards:
225 Create a fake head, make sure tag not visible afterwards:
226
226
227 $ cp .hgtags tags
227 $ cp .hgtags tags
228 $ hg tag last
228 $ hg tag last
229 $ hg rm .hgtags
229 $ hg rm .hgtags
230 $ hg commit -m "remove"
230 $ hg commit -m "remove"
231
231
232 $ mv tags .hgtags
232 $ mv tags .hgtags
233 $ hg add .hgtags
233 $ hg add .hgtags
234 $ hg commit -m "readd"
234 $ hg commit -m "readd"
235 $
235 $
236 $ hg tags
236 $ hg tags
237 tip 6:35ff301afafe
237 tip 6:35ff301afafe
238 first 0:acb14030fe0a
238 first 0:acb14030fe0a
239
239
240 Add invalid tags:
240 Add invalid tags:
241
241
242 $ echo "spam" >> .hgtags
242 $ echo "spam" >> .hgtags
243 $ echo >> .hgtags
243 $ echo >> .hgtags
244 $ echo "foo bar" >> .hgtags
244 $ echo "foo bar" >> .hgtags
245 $ echo "a5a5 invalid" >> .hg/localtags
245 $ echo "a5a5 invalid" >> .hg/localtags
246 $ cat .hgtags
246 $ cat .hgtags
247 acb14030fe0a21b60322c440ad2d20cf7685a376 first
247 acb14030fe0a21b60322c440ad2d20cf7685a376 first
248 spam
248 spam
249
249
250 foo bar
250 foo bar
251 $ hg commit -m "tags"
251 $ hg commit -m "tags"
252
252
253 Report tag parse error on other head:
253 Report tag parse error on other head:
254
254
255 $ hg up 3
255 $ hg up 3
256 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
256 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
257 $ echo 'x y' >> .hgtags
257 $ echo 'x y' >> .hgtags
258 $ hg commit -m "head"
258 $ hg commit -m "head"
259 created new head
259 created new head
260
260
261 $ hg tags
261 $ hg tags
262 .hgtags@75d9f02dfe28, line 2: cannot parse entry
262 .hgtags@75d9f02dfe28, line 2: cannot parse entry
263 .hgtags@75d9f02dfe28, line 4: node 'foo' is not well formed
263 .hgtags@75d9f02dfe28, line 4: node 'foo' is not well formed
264 .hgtags@c4be69a18c11, line 2: node 'x' is not well formed
264 .hgtags@c4be69a18c11, line 2: node 'x' is not well formed
265 tip 8:c4be69a18c11
265 tip 8:c4be69a18c11
266 first 0:acb14030fe0a
266 first 0:acb14030fe0a
267 $ hg tip
267 $ hg tip
268 changeset: 8:c4be69a18c11
268 changeset: 8:c4be69a18c11
269 tag: tip
269 tag: tip
270 parent: 3:ac5e980c4dc0
270 parent: 3:ac5e980c4dc0
271 user: test
271 user: test
272 date: Thu Jan 01 00:00:00 1970 +0000
272 date: Thu Jan 01 00:00:00 1970 +0000
273 summary: head
273 summary: head
274
274
275
275
276 Test tag precedence rules:
276 Test tag precedence rules:
277
277
278 $ cd ..
278 $ cd ..
279 $ hg init t2
279 $ hg init t2
280 $ cd t2
280 $ cd t2
281 $ echo foo > foo
281 $ echo foo > foo
282 $ hg add foo
282 $ hg add foo
283 $ hg ci -m 'add foo' # rev 0
283 $ hg ci -m 'add foo' # rev 0
284 $ hg tag bar # rev 1
284 $ hg tag bar # rev 1
285 $ echo >> foo
285 $ echo >> foo
286 $ hg ci -m 'change foo 1' # rev 2
286 $ hg ci -m 'change foo 1' # rev 2
287 $ hg up -C 1
287 $ hg up -C 1
288 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
288 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
289 $ hg tag -r 1 -f bar # rev 3
289 $ hg tag -r 1 -f bar # rev 3
290 $ hg up -C 1
290 $ hg up -C 1
291 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
291 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
292 $ echo >> foo
292 $ echo >> foo
293 $ hg ci -m 'change foo 2' # rev 4
293 $ hg ci -m 'change foo 2' # rev 4
294 created new head
294 created new head
295 $ hg tags
295 $ hg tags
296 tip 4:0c192d7d5e6b
296 tip 4:0c192d7d5e6b
297 bar 1:78391a272241
297 bar 1:78391a272241
298
298
299 Repeat in case of cache effects:
299 Repeat in case of cache effects:
300
300
301 $ hg tags
301 $ hg tags
302 tip 4:0c192d7d5e6b
302 tip 4:0c192d7d5e6b
303 bar 1:78391a272241
303 bar 1:78391a272241
304
304
305 Detailed dump of tag info:
305 Detailed dump of tag info:
306
306
307 $ hg heads -q # expect 4, 3, 2
307 $ hg heads -q # expect 4, 3, 2
308 4:0c192d7d5e6b
308 4:0c192d7d5e6b
309 3:6fa450212aeb
309 3:6fa450212aeb
310 2:7a94127795a3
310 2:7a94127795a3
311 $ dumptags 2
311 $ dumptags 2
312 rev 2: .hgtags:
312 rev 2: .hgtags:
313 bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar
313 bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar
314 $ dumptags 3
314 $ dumptags 3
315 rev 3: .hgtags:
315 rev 3: .hgtags:
316 bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar
316 bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar
317 bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar
317 bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar
318 78391a272241d70354aa14c874552cad6b51bb42 bar
318 78391a272241d70354aa14c874552cad6b51bb42 bar
319 $ dumptags 4
319 $ dumptags 4
320 rev 4: .hgtags:
320 rev 4: .hgtags:
321 bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar
321 bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar
322
322
323 Dump cache:
323 Dump cache:
324
324
325 $ cat .hg/cache/tags2-visible
325 $ cat .hg/cache/tags2-visible
326 4 0c192d7d5e6b78a714de54a2e9627952a877e25a
326 4 0c192d7d5e6b78a714de54a2e9627952a877e25a
327 bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar
327 bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar
328 bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar
328 bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar
329 78391a272241d70354aa14c874552cad6b51bb42 bar
329 78391a272241d70354aa14c874552cad6b51bb42 bar
330
330
331 $ f --size --hexdump .hg/cache/hgtagsfnodes1
331 $ f --size --hexdump .hg/cache/hgtagsfnodes1
332 .hg/cache/hgtagsfnodes1: size=120
332 .hg/cache/hgtagsfnodes1: size=120
333 0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
333 0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
334 0010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
334 0010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
335 0020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
335 0020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
336 0030: 7a 94 12 77 0c 04 f2 a8 af 31 de 17 fa b7 42 28 |z..w.....1....B(|
336 0030: 7a 94 12 77 0c 04 f2 a8 af 31 de 17 fa b7 42 28 |z..w.....1....B(|
337 0040: 78 ee 5a 2d ad bc 94 3d 6f a4 50 21 7d 3b 71 8c |x.Z-...=o.P!};q.|
337 0040: 78 ee 5a 2d ad bc 94 3d 6f a4 50 21 7d 3b 71 8c |x.Z-...=o.P!};q.|
338 0050: 96 4e f3 7b 89 e5 50 eb da fd 57 89 e7 6c e1 b0 |.N.{..P...W..l..|
338 0050: 96 4e f3 7b 89 e5 50 eb da fd 57 89 e7 6c e1 b0 |.N.{..P...W..l..|
339 0060: 0c 19 2d 7d 0c 04 f2 a8 af 31 de 17 fa b7 42 28 |..-}.....1....B(|
339 0060: 0c 19 2d 7d 0c 04 f2 a8 af 31 de 17 fa b7 42 28 |..-}.....1....B(|
340 0070: 78 ee 5a 2d ad bc 94 3d |x.Z-...=|
340 0070: 78 ee 5a 2d ad bc 94 3d |x.Z-...=|
341
341
342 Corrupt the .hgtags fnodes cache
342 Corrupt the .hgtags fnodes cache
343 Extra junk data at the end should get overwritten on next cache update
343 Extra junk data at the end should get overwritten on next cache update
344
344
345 $ echo extra >> .hg/cache/hgtagsfnodes1
345 $ echo extra >> .hg/cache/hgtagsfnodes1
346 $ echo dummy1 > foo
346 $ echo dummy1 > foo
347 $ hg commit -m throwaway1
347 $ hg commit -m throwaway1
348
348
349 $ hg tags
349 $ hg tags
350 tip 5:8dbfe60eff30
350 tip 5:8dbfe60eff30
351 bar 1:78391a272241
351 bar 1:78391a272241
352
352
353 $ hg blackbox -l 6
353 $ hg blackbox -l 6
354 1970/01/01 00:00:00 bob (5000)> tags
354 1970/01/01 00:00:00 bob @8dbfe60eff306a54259cfe007db9e330e7ecf866 (5000)> tags
355 1970/01/01 00:00:00 bob (5000)> writing 24 bytes to cache/hgtagsfnodes1
355 1970/01/01 00:00:00 bob @8dbfe60eff306a54259cfe007db9e330e7ecf866 (5000)> writing 24 bytes to cache/hgtagsfnodes1
356 1970/01/01 00:00:00 bob (5000)> 2/3 cache hits/lookups in * seconds (glob)
356 1970/01/01 00:00:00 bob @8dbfe60eff306a54259cfe007db9e330e7ecf866 (5000)> 2/3 cache hits/lookups in * seconds (glob)
357 1970/01/01 00:00:00 bob (5000)> writing .hg/cache/tags2-visible with 1 tags
357 1970/01/01 00:00:00 bob @8dbfe60eff306a54259cfe007db9e330e7ecf866 (5000)> writing .hg/cache/tags2-visible with 1 tags
358 1970/01/01 00:00:00 bob (5000)> tags exited 0 after * seconds (glob)
358 1970/01/01 00:00:00 bob @(unknown) (5000)> tags exited 0 after * seconds (glob)
359 1970/01/01 00:00:00 bob (5000)> blackbox -l 6
359 1970/01/01 00:00:00 bob @8dbfe60eff306a54259cfe007db9e330e7ecf866 (5000)> blackbox -l 6
360
360
361 #if unix-permissions no-root
361 #if unix-permissions no-root
362 Errors writing to .hgtags fnodes cache are silently ignored
362 Errors writing to .hgtags fnodes cache are silently ignored
363
363
364 $ echo dummy2 > foo
364 $ echo dummy2 > foo
365 $ hg commit -m throwaway2
365 $ hg commit -m throwaway2
366
366
367 $ chmod a-w .hg/cache/hgtagsfnodes1
367 $ chmod a-w .hg/cache/hgtagsfnodes1
368 $ rm -f .hg/cache/tags2-visible
368 $ rm -f .hg/cache/tags2-visible
369
369
370 $ hg tags
370 $ hg tags
371 tip 6:b968051b5cf3
371 tip 6:b968051b5cf3
372 bar 1:78391a272241
372 bar 1:78391a272241
373
373
374 $ hg blackbox -l 6
374 $ hg blackbox -l 6
375 1970/01/01 00:00:00 bob (5000)> tags
375 1970/01/01 00:00:00 bob @b968051b5cf3f624b771779c6d5f84f1d4c3fb5d (5000)> tags
376 1970/01/01 00:00:00 bob (5000)> couldn't write cache/hgtagsfnodes1: [Errno 13] Permission denied: '$TESTTMP/t2/.hg/cache/hgtagsfnodes1' (glob)
376 1970/01/01 00:00:00 bob @b968051b5cf3f624b771779c6d5f84f1d4c3fb5d (5000)> couldn't write cache/hgtagsfnodes1: [Errno 13] Permission denied: '$TESTTMP/t2/.hg/cache/hgtagsfnodes1'
377 1970/01/01 00:00:00 bob (5000)> 2/3 cache hits/lookups in * seconds (glob)
377 1970/01/01 00:00:00 bob @b968051b5cf3f624b771779c6d5f84f1d4c3fb5d (5000)> 2/3 cache hits/lookups in * seconds (glob)
378 1970/01/01 00:00:00 bob (5000)> writing .hg/cache/tags2-visible with 1 tags
378 1970/01/01 00:00:00 bob @b968051b5cf3f624b771779c6d5f84f1d4c3fb5d (5000)> writing .hg/cache/tags2-visible with 1 tags
379 1970/01/01 00:00:00 bob (5000)> tags exited 0 after * seconds (glob)
379 1970/01/01 00:00:00 bob @(unknown) (5000)> tags exited 0 after * seconds (glob)
380 1970/01/01 00:00:00 bob (5000)> blackbox -l 6
380 1970/01/01 00:00:00 bob @b968051b5cf3f624b771779c6d5f84f1d4c3fb5d (5000)> blackbox -l 6
381
381
382 $ chmod a+w .hg/cache/hgtagsfnodes1
382 $ chmod a+w .hg/cache/hgtagsfnodes1
383
383
384 $ rm -f .hg/cache/tags2-visible
384 $ rm -f .hg/cache/tags2-visible
385 $ hg tags
385 $ hg tags
386 tip 6:b968051b5cf3
386 tip 6:b968051b5cf3
387 bar 1:78391a272241
387 bar 1:78391a272241
388
388
389 $ hg blackbox -l 6
389 $ hg blackbox -l 6
390 1970/01/01 00:00:00 bob (5000)> tags
390 1970/01/01 00:00:00 bob @b968051b5cf3f624b771779c6d5f84f1d4c3fb5d (5000)> tags
391 1970/01/01 00:00:00 bob (5000)> writing 24 bytes to cache/hgtagsfnodes1
391 1970/01/01 00:00:00 bob @b968051b5cf3f624b771779c6d5f84f1d4c3fb5d (5000)> writing 24 bytes to cache/hgtagsfnodes1
392 1970/01/01 00:00:00 bob (5000)> 2/3 cache hits/lookups in * seconds (glob)
392 1970/01/01 00:00:00 bob @b968051b5cf3f624b771779c6d5f84f1d4c3fb5d (5000)> 2/3 cache hits/lookups in * seconds (glob)
393 1970/01/01 00:00:00 bob (5000)> writing .hg/cache/tags2-visible with 1 tags
393 1970/01/01 00:00:00 bob @b968051b5cf3f624b771779c6d5f84f1d4c3fb5d (5000)> writing .hg/cache/tags2-visible with 1 tags
394 1970/01/01 00:00:00 bob (5000)> tags exited 0 after * seconds (glob)
394 1970/01/01 00:00:00 bob @(unknown) (5000)> tags exited 0 after * seconds (glob)
395 1970/01/01 00:00:00 bob (5000)> blackbox -l 6
395 1970/01/01 00:00:00 bob @b968051b5cf3f624b771779c6d5f84f1d4c3fb5d (5000)> blackbox -l 6
396
396
397 $ f --size .hg/cache/hgtagsfnodes1
397 $ f --size .hg/cache/hgtagsfnodes1
398 .hg/cache/hgtagsfnodes1: size=168
398 .hg/cache/hgtagsfnodes1: size=168
399
399
400 $ hg -q --config extensions.strip= strip -r 6 --no-backup
400 $ hg -q --config extensions.strip= strip -r 6 --no-backup
401 #endif
401 #endif
402
402
403 Stripping doesn't truncate the tags cache until new data is available
403 Stripping doesn't truncate the tags cache until new data is available
404
404
405 $ rm -f .hg/cache/hgtagsfnodes1 .hg/cache/tags2-visible
405 $ rm -f .hg/cache/hgtagsfnodes1 .hg/cache/tags2-visible
406 $ hg tags
406 $ hg tags
407 tip 5:8dbfe60eff30
407 tip 5:8dbfe60eff30
408 bar 1:78391a272241
408 bar 1:78391a272241
409
409
410 $ f --size .hg/cache/hgtagsfnodes1
410 $ f --size .hg/cache/hgtagsfnodes1
411 .hg/cache/hgtagsfnodes1: size=144
411 .hg/cache/hgtagsfnodes1: size=144
412
412
413 $ hg -q --config extensions.strip= strip -r 5 --no-backup
413 $ hg -q --config extensions.strip= strip -r 5 --no-backup
414 $ hg tags
414 $ hg tags
415 tip 4:0c192d7d5e6b
415 tip 4:0c192d7d5e6b
416 bar 1:78391a272241
416 bar 1:78391a272241
417
417
418 $ hg blackbox -l 5
418 $ hg blackbox -l 5
419 1970/01/01 00:00:00 bob (5000)> writing 24 bytes to cache/hgtagsfnodes1
419 1970/01/01 00:00:00 bob @0c192d7d5e6b78a714de54a2e9627952a877e25a (5000)> writing 24 bytes to cache/hgtagsfnodes1
420 1970/01/01 00:00:00 bob (5000)> 2/3 cache hits/lookups in * seconds (glob)
420 1970/01/01 00:00:00 bob @0c192d7d5e6b78a714de54a2e9627952a877e25a (5000)> 2/3 cache hits/lookups in * seconds (glob)
421 1970/01/01 00:00:00 bob (5000)> writing .hg/cache/tags2-visible with 1 tags
421 1970/01/01 00:00:00 bob @0c192d7d5e6b78a714de54a2e9627952a877e25a (5000)> writing .hg/cache/tags2-visible with 1 tags
422 1970/01/01 00:00:00 bob (5000)> tags exited 0 after * seconds (glob)
422 1970/01/01 00:00:00 bob @(unknown) (5000)> tags exited 0 after * seconds (glob)
423 1970/01/01 00:00:00 bob (5000)> blackbox -l 5
423 1970/01/01 00:00:00 bob @0c192d7d5e6b78a714de54a2e9627952a877e25a (5000)> blackbox -l 5
424
424
425 $ f --size .hg/cache/hgtagsfnodes1
425 $ f --size .hg/cache/hgtagsfnodes1
426 .hg/cache/hgtagsfnodes1: size=120
426 .hg/cache/hgtagsfnodes1: size=120
427
427
428 $ echo dummy > foo
428 $ echo dummy > foo
429 $ hg commit -m throwaway3
429 $ hg commit -m throwaway3
430
430
431 $ hg tags
431 $ hg tags
432 tip 5:035f65efb448
432 tip 5:035f65efb448
433 bar 1:78391a272241
433 bar 1:78391a272241
434
434
435 $ hg blackbox -l 6
435 $ hg blackbox -l 6
436 1970/01/01 00:00:00 bob (5000)> tags
436 1970/01/01 00:00:00 bob @035f65efb448350f4772141702a81ab1df48c465 (5000)> tags
437 1970/01/01 00:00:00 bob (5000)> writing 24 bytes to cache/hgtagsfnodes1
437 1970/01/01 00:00:00 bob @035f65efb448350f4772141702a81ab1df48c465 (5000)> writing 24 bytes to cache/hgtagsfnodes1
438 1970/01/01 00:00:00 bob (5000)> 2/3 cache hits/lookups in * seconds (glob)
438 1970/01/01 00:00:00 bob @035f65efb448350f4772141702a81ab1df48c465 (5000)> 2/3 cache hits/lookups in * seconds (glob)
439 1970/01/01 00:00:00 bob (5000)> writing .hg/cache/tags2-visible with 1 tags
439 1970/01/01 00:00:00 bob @035f65efb448350f4772141702a81ab1df48c465 (5000)> writing .hg/cache/tags2-visible with 1 tags
440 1970/01/01 00:00:00 bob (5000)> tags exited 0 after * seconds (glob)
440 1970/01/01 00:00:00 bob @(unknown) (5000)> tags exited 0 after * seconds (glob)
441 1970/01/01 00:00:00 bob (5000)> blackbox -l 6
441 1970/01/01 00:00:00 bob @035f65efb448350f4772141702a81ab1df48c465 (5000)> blackbox -l 6
442 $ f --size .hg/cache/hgtagsfnodes1
442 $ f --size .hg/cache/hgtagsfnodes1
443 .hg/cache/hgtagsfnodes1: size=144
443 .hg/cache/hgtagsfnodes1: size=144
444
444
445 $ hg -q --config extensions.strip= strip -r 5 --no-backup
445 $ hg -q --config extensions.strip= strip -r 5 --no-backup
446
446
447 Test tag removal:
447 Test tag removal:
448
448
449 $ hg tag --remove bar # rev 5
449 $ hg tag --remove bar # rev 5
450 $ hg tip -vp
450 $ hg tip -vp
451 changeset: 5:5f6e8655b1c7
451 changeset: 5:5f6e8655b1c7
452 tag: tip
452 tag: tip
453 user: test
453 user: test
454 date: Thu Jan 01 00:00:00 1970 +0000
454 date: Thu Jan 01 00:00:00 1970 +0000
455 files: .hgtags
455 files: .hgtags
456 description:
456 description:
457 Removed tag bar
457 Removed tag bar
458
458
459
459
460 diff -r 0c192d7d5e6b -r 5f6e8655b1c7 .hgtags
460 diff -r 0c192d7d5e6b -r 5f6e8655b1c7 .hgtags
461 --- a/.hgtags Thu Jan 01 00:00:00 1970 +0000
461 --- a/.hgtags Thu Jan 01 00:00:00 1970 +0000
462 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
462 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
463 @@ -1,1 +1,3 @@
463 @@ -1,1 +1,3 @@
464 bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar
464 bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar
465 +78391a272241d70354aa14c874552cad6b51bb42 bar
465 +78391a272241d70354aa14c874552cad6b51bb42 bar
466 +0000000000000000000000000000000000000000 bar
466 +0000000000000000000000000000000000000000 bar
467
467
468 $ hg tags
468 $ hg tags
469 tip 5:5f6e8655b1c7
469 tip 5:5f6e8655b1c7
470 $ hg tags # again, try to expose cache bugs
470 $ hg tags # again, try to expose cache bugs
471 tip 5:5f6e8655b1c7
471 tip 5:5f6e8655b1c7
472
472
473 Remove nonexistent tag:
473 Remove nonexistent tag:
474
474
475 $ hg tag --remove foobar
475 $ hg tag --remove foobar
476 abort: tag 'foobar' does not exist
476 abort: tag 'foobar' does not exist
477 [255]
477 [255]
478 $ hg tip
478 $ hg tip
479 changeset: 5:5f6e8655b1c7
479 changeset: 5:5f6e8655b1c7
480 tag: tip
480 tag: tip
481 user: test
481 user: test
482 date: Thu Jan 01 00:00:00 1970 +0000
482 date: Thu Jan 01 00:00:00 1970 +0000
483 summary: Removed tag bar
483 summary: Removed tag bar
484
484
485
485
486 Undo a tag with rollback:
486 Undo a tag with rollback:
487
487
488 $ hg rollback # destroy rev 5 (restore bar)
488 $ hg rollback # destroy rev 5 (restore bar)
489 repository tip rolled back to revision 4 (undo commit)
489 repository tip rolled back to revision 4 (undo commit)
490 working directory now based on revision 4
490 working directory now based on revision 4
491 $ hg tags
491 $ hg tags
492 tip 4:0c192d7d5e6b
492 tip 4:0c192d7d5e6b
493 bar 1:78391a272241
493 bar 1:78391a272241
494 $ hg tags
494 $ hg tags
495 tip 4:0c192d7d5e6b
495 tip 4:0c192d7d5e6b
496 bar 1:78391a272241
496 bar 1:78391a272241
497
497
498 Test tag rank:
498 Test tag rank:
499
499
500 $ cd ..
500 $ cd ..
501 $ hg init t3
501 $ hg init t3
502 $ cd t3
502 $ cd t3
503 $ echo foo > foo
503 $ echo foo > foo
504 $ hg add foo
504 $ hg add foo
505 $ hg ci -m 'add foo' # rev 0
505 $ hg ci -m 'add foo' # rev 0
506 $ hg tag -f bar # rev 1 bar -> 0
506 $ hg tag -f bar # rev 1 bar -> 0
507 $ hg tag -f bar # rev 2 bar -> 1
507 $ hg tag -f bar # rev 2 bar -> 1
508 $ hg tag -fr 0 bar # rev 3 bar -> 0
508 $ hg tag -fr 0 bar # rev 3 bar -> 0
509 $ hg tag -fr 1 bar # rev 4 bar -> 1
509 $ hg tag -fr 1 bar # rev 4 bar -> 1
510 $ hg tag -fr 0 bar # rev 5 bar -> 0
510 $ hg tag -fr 0 bar # rev 5 bar -> 0
511 $ hg tags
511 $ hg tags
512 tip 5:85f05169d91d
512 tip 5:85f05169d91d
513 bar 0:bbd179dfa0a7
513 bar 0:bbd179dfa0a7
514 $ hg co 3
514 $ hg co 3
515 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
515 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
516 $ echo barbar > foo
516 $ echo barbar > foo
517 $ hg ci -m 'change foo' # rev 6
517 $ hg ci -m 'change foo' # rev 6
518 created new head
518 created new head
519 $ hg tags
519 $ hg tags
520 tip 6:735c3ca72986
520 tip 6:735c3ca72986
521 bar 0:bbd179dfa0a7
521 bar 0:bbd179dfa0a7
522
522
523 Don't allow moving tag without -f:
523 Don't allow moving tag without -f:
524
524
525 $ hg tag -r 3 bar
525 $ hg tag -r 3 bar
526 abort: tag 'bar' already exists (use -f to force)
526 abort: tag 'bar' already exists (use -f to force)
527 [255]
527 [255]
528 $ hg tags
528 $ hg tags
529 tip 6:735c3ca72986
529 tip 6:735c3ca72986
530 bar 0:bbd179dfa0a7
530 bar 0:bbd179dfa0a7
531
531
532 Strip 1: expose an old head:
532 Strip 1: expose an old head:
533
533
534 $ hg --config extensions.mq= strip 5
534 $ hg --config extensions.mq= strip 5
535 saved backup bundle to $TESTTMP/t3/.hg/strip-backup/*-backup.hg (glob)
535 saved backup bundle to $TESTTMP/t3/.hg/strip-backup/*-backup.hg (glob)
536 $ hg tags # partly stale cache
536 $ hg tags # partly stale cache
537 tip 5:735c3ca72986
537 tip 5:735c3ca72986
538 bar 1:78391a272241
538 bar 1:78391a272241
539 $ hg tags # up-to-date cache
539 $ hg tags # up-to-date cache
540 tip 5:735c3ca72986
540 tip 5:735c3ca72986
541 bar 1:78391a272241
541 bar 1:78391a272241
542
542
543 Strip 2: destroy whole branch, no old head exposed
543 Strip 2: destroy whole branch, no old head exposed
544
544
545 $ hg --config extensions.mq= strip 4
545 $ hg --config extensions.mq= strip 4
546 saved backup bundle to $TESTTMP/t3/.hg/strip-backup/*-backup.hg (glob)
546 saved backup bundle to $TESTTMP/t3/.hg/strip-backup/*-backup.hg (glob)
547 $ hg tags # partly stale
547 $ hg tags # partly stale
548 tip 4:735c3ca72986
548 tip 4:735c3ca72986
549 bar 0:bbd179dfa0a7
549 bar 0:bbd179dfa0a7
550 $ rm -f .hg/cache/tags2-visible
550 $ rm -f .hg/cache/tags2-visible
551 $ hg tags # cold cache
551 $ hg tags # cold cache
552 tip 4:735c3ca72986
552 tip 4:735c3ca72986
553 bar 0:bbd179dfa0a7
553 bar 0:bbd179dfa0a7
554
554
555 Test tag rank with 3 heads:
555 Test tag rank with 3 heads:
556
556
557 $ cd ..
557 $ cd ..
558 $ hg init t4
558 $ hg init t4
559 $ cd t4
559 $ cd t4
560 $ echo foo > foo
560 $ echo foo > foo
561 $ hg add
561 $ hg add
562 adding foo
562 adding foo
563 $ hg ci -m 'add foo' # rev 0
563 $ hg ci -m 'add foo' # rev 0
564 $ hg tag bar # rev 1 bar -> 0
564 $ hg tag bar # rev 1 bar -> 0
565 $ hg tag -f bar # rev 2 bar -> 1
565 $ hg tag -f bar # rev 2 bar -> 1
566 $ hg up -qC 0
566 $ hg up -qC 0
567 $ hg tag -fr 2 bar # rev 3 bar -> 2
567 $ hg tag -fr 2 bar # rev 3 bar -> 2
568 $ hg tags
568 $ hg tags
569 tip 3:197c21bbbf2c
569 tip 3:197c21bbbf2c
570 bar 2:6fa450212aeb
570 bar 2:6fa450212aeb
571 $ hg up -qC 0
571 $ hg up -qC 0
572 $ hg tag -m 'retag rev 0' -fr 0 bar # rev 4 bar -> 0, but bar stays at 2
572 $ hg tag -m 'retag rev 0' -fr 0 bar # rev 4 bar -> 0, but bar stays at 2
573
573
574 Bar should still point to rev 2:
574 Bar should still point to rev 2:
575
575
576 $ hg tags
576 $ hg tags
577 tip 4:3b4b14ed0202
577 tip 4:3b4b14ed0202
578 bar 2:6fa450212aeb
578 bar 2:6fa450212aeb
579
579
580 Test that removing global/local tags does not get confused when trying
580 Test that removing global/local tags does not get confused when trying
581 to remove a tag of type X which actually only exists as a type Y:
581 to remove a tag of type X which actually only exists as a type Y:
582
582
583 $ cd ..
583 $ cd ..
584 $ hg init t5
584 $ hg init t5
585 $ cd t5
585 $ cd t5
586 $ echo foo > foo
586 $ echo foo > foo
587 $ hg add
587 $ hg add
588 adding foo
588 adding foo
589 $ hg ci -m 'add foo' # rev 0
589 $ hg ci -m 'add foo' # rev 0
590
590
591 $ hg tag -r 0 -l localtag
591 $ hg tag -r 0 -l localtag
592 $ hg tag --remove localtag
592 $ hg tag --remove localtag
593 abort: tag 'localtag' is not a global tag
593 abort: tag 'localtag' is not a global tag
594 [255]
594 [255]
595 $
595 $
596 $ hg tag -r 0 globaltag
596 $ hg tag -r 0 globaltag
597 $ hg tag --remove -l globaltag
597 $ hg tag --remove -l globaltag
598 abort: tag 'globaltag' is not a local tag
598 abort: tag 'globaltag' is not a local tag
599 [255]
599 [255]
600 $ hg tags -v
600 $ hg tags -v
601 tip 1:a0b6fe111088
601 tip 1:a0b6fe111088
602 localtag 0:bbd179dfa0a7 local
602 localtag 0:bbd179dfa0a7 local
603 globaltag 0:bbd179dfa0a7
603 globaltag 0:bbd179dfa0a7
604
604
605 Test for issue3911
605 Test for issue3911
606
606
607 $ hg tag -r 0 -l localtag2
607 $ hg tag -r 0 -l localtag2
608 $ hg tag -l --remove localtag2
608 $ hg tag -l --remove localtag2
609 $ hg tags -v
609 $ hg tags -v
610 tip 1:a0b6fe111088
610 tip 1:a0b6fe111088
611 localtag 0:bbd179dfa0a7 local
611 localtag 0:bbd179dfa0a7 local
612 globaltag 0:bbd179dfa0a7
612 globaltag 0:bbd179dfa0a7
613
613
614 $ hg tag -r 1 -f localtag
614 $ hg tag -r 1 -f localtag
615 $ hg tags -v
615 $ hg tags -v
616 tip 2:5c70a037bb37
616 tip 2:5c70a037bb37
617 localtag 1:a0b6fe111088
617 localtag 1:a0b6fe111088
618 globaltag 0:bbd179dfa0a7
618 globaltag 0:bbd179dfa0a7
619
619
620 $ hg tags -v
620 $ hg tags -v
621 tip 2:5c70a037bb37
621 tip 2:5c70a037bb37
622 localtag 1:a0b6fe111088
622 localtag 1:a0b6fe111088
623 globaltag 0:bbd179dfa0a7
623 globaltag 0:bbd179dfa0a7
624
624
625 $ hg tag -r 1 localtag2
625 $ hg tag -r 1 localtag2
626 $ hg tags -v
626 $ hg tags -v
627 tip 3:bbfb8cd42be2
627 tip 3:bbfb8cd42be2
628 localtag2 1:a0b6fe111088
628 localtag2 1:a0b6fe111088
629 localtag 1:a0b6fe111088
629 localtag 1:a0b6fe111088
630 globaltag 0:bbd179dfa0a7
630 globaltag 0:bbd179dfa0a7
631
631
632 $ hg tags -v
632 $ hg tags -v
633 tip 3:bbfb8cd42be2
633 tip 3:bbfb8cd42be2
634 localtag2 1:a0b6fe111088
634 localtag2 1:a0b6fe111088
635 localtag 1:a0b6fe111088
635 localtag 1:a0b6fe111088
636 globaltag 0:bbd179dfa0a7
636 globaltag 0:bbd179dfa0a7
637
637
638 $ cd ..
638 $ cd ..
639
639
640 Create a repository with tags data to test .hgtags fnodes transfer
640 Create a repository with tags data to test .hgtags fnodes transfer
641
641
642 $ hg init tagsserver
642 $ hg init tagsserver
643 $ cd tagsserver
643 $ cd tagsserver
644 $ cat > .hg/hgrc << EOF
644 $ cat > .hg/hgrc << EOF
645 > [experimental]
645 > [experimental]
646 > bundle2-exp=True
646 > bundle2-exp=True
647 > EOF
647 > EOF
648 $ touch foo
648 $ touch foo
649 $ hg -q commit -A -m initial
649 $ hg -q commit -A -m initial
650 $ hg tag -m 'tag 0.1' 0.1
650 $ hg tag -m 'tag 0.1' 0.1
651 $ echo second > foo
651 $ echo second > foo
652 $ hg commit -m second
652 $ hg commit -m second
653 $ hg tag -m 'tag 0.2' 0.2
653 $ hg tag -m 'tag 0.2' 0.2
654 $ hg tags
654 $ hg tags
655 tip 3:40f0358cb314
655 tip 3:40f0358cb314
656 0.2 2:f63cc8fe54e4
656 0.2 2:f63cc8fe54e4
657 0.1 0:96ee1d7354c4
657 0.1 0:96ee1d7354c4
658 $ cd ..
658 $ cd ..
659
659
660 Cloning should pull down hgtags fnodes mappings and write the cache file
660 Cloning should pull down hgtags fnodes mappings and write the cache file
661
661
662 $ hg --config experimental.bundle2-exp=True clone --pull tagsserver tagsclient
662 $ hg --config experimental.bundle2-exp=True clone --pull tagsserver tagsclient
663 requesting all changes
663 requesting all changes
664 adding changesets
664 adding changesets
665 adding manifests
665 adding manifests
666 adding file changes
666 adding file changes
667 added 4 changesets with 4 changes to 2 files
667 added 4 changesets with 4 changes to 2 files
668 updating to branch default
668 updating to branch default
669 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
669 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
670
670
671 Missing tags2* files means the cache wasn't written through the normal mechanism.
671 Missing tags2* files means the cache wasn't written through the normal mechanism.
672
672
673 $ ls tagsclient/.hg/cache
673 $ ls tagsclient/.hg/cache
674 branch2-served
674 branch2-served
675 hgtagsfnodes1
675 hgtagsfnodes1
676 rbc-names-v1
676 rbc-names-v1
677 rbc-revs-v1
677 rbc-revs-v1
678
678
679 Cache should contain the head only, even though other nodes have tags data
679 Cache should contain the head only, even though other nodes have tags data
680
680
681 $ f --size --hexdump tagsclient/.hg/cache/hgtagsfnodes1
681 $ f --size --hexdump tagsclient/.hg/cache/hgtagsfnodes1
682 tagsclient/.hg/cache/hgtagsfnodes1: size=96
682 tagsclient/.hg/cache/hgtagsfnodes1: size=96
683 0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
683 0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
684 0010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
684 0010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
685 0020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
685 0020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
686 0030: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
686 0030: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
687 0040: ff ff ff ff ff ff ff ff 40 f0 35 8c 19 e0 a7 d3 |........@.5.....|
687 0040: ff ff ff ff ff ff ff ff 40 f0 35 8c 19 e0 a7 d3 |........@.5.....|
688 0050: 8a 5c 6a 82 4d cf fb a5 87 d0 2f a3 1e 4f 2f 8a |.\j.M...../..O/.|
688 0050: 8a 5c 6a 82 4d cf fb a5 87 d0 2f a3 1e 4f 2f 8a |.\j.M...../..O/.|
689
689
690 Running hg tags should produce tags2* file and not change cache
690 Running hg tags should produce tags2* file and not change cache
691
691
692 $ hg -R tagsclient tags
692 $ hg -R tagsclient tags
693 tip 3:40f0358cb314
693 tip 3:40f0358cb314
694 0.2 2:f63cc8fe54e4
694 0.2 2:f63cc8fe54e4
695 0.1 0:96ee1d7354c4
695 0.1 0:96ee1d7354c4
696
696
697 $ ls tagsclient/.hg/cache
697 $ ls tagsclient/.hg/cache
698 branch2-served
698 branch2-served
699 hgtagsfnodes1
699 hgtagsfnodes1
700 rbc-names-v1
700 rbc-names-v1
701 rbc-revs-v1
701 rbc-revs-v1
702 tags2-visible
702 tags2-visible
703
703
704 $ f --size --hexdump tagsclient/.hg/cache/hgtagsfnodes1
704 $ f --size --hexdump tagsclient/.hg/cache/hgtagsfnodes1
705 tagsclient/.hg/cache/hgtagsfnodes1: size=96
705 tagsclient/.hg/cache/hgtagsfnodes1: size=96
706 0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
706 0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
707 0010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
707 0010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
708 0020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
708 0020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
709 0030: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
709 0030: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
710 0040: ff ff ff ff ff ff ff ff 40 f0 35 8c 19 e0 a7 d3 |........@.5.....|
710 0040: ff ff ff ff ff ff ff ff 40 f0 35 8c 19 e0 a7 d3 |........@.5.....|
711 0050: 8a 5c 6a 82 4d cf fb a5 87 d0 2f a3 1e 4f 2f 8a |.\j.M...../..O/.|
711 0050: 8a 5c 6a 82 4d cf fb a5 87 d0 2f a3 1e 4f 2f 8a |.\j.M...../..O/.|
712
712
General Comments 0
You need to be logged in to leave comments. Login now