@@ -353,17 +353,18 @@ def _readtagcache(ui, repo):
# Caller has to iterate over all heads, but can use the filenodes in
# cachefnode to get to each .hgtags revision quickly.
return (repoheads, cachefnode, valid, None, True)
def _writetagcache(ui, repo, valid, cachetags):
+ filename = _filename(repo)
try:
- cachefile = repo.vfs(_filename(repo), 'w', atomictemp=True)
+ cachefile = repo.vfs(filename, 'w', atomictemp=True)
except (OSError, IOError):
return
- ui.log('tagscache', 'writing tags cache file with %d tags\n',
- len(cachetags))
+ ui.log('tagscache', 'writing .hg/%s with %d tags\n',
+ filename, len(cachetags))
if valid[2]:
cachefile.write('%d %s %s\n' % (valid[0], hex(valid[1]), hex(valid[2])))
else:
cachefile.write('%d %s\n' % (valid[0], hex(valid[1])))
@@ -121,11 +121,11 @@ extension and python hooks - use the eol
$ hg update
hooked
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg blackbox -l 5
1970/01/01 00:00:00 bob> update
- 1970/01/01 00:00:00 bob> writing tags cache file with 0 tags
+ 1970/01/01 00:00:00 bob> writing .hg/cache/tags2-visible with 0 tags
1970/01/01 00:00:00 bob> pythonhook-preupdate: hgext.eol.preupdate finished in * seconds (glob)
1970/01/01 00:00:00 bob> exthook-update: echo hooked finished in * seconds (glob)
1970/01/01 00:00:00 bob> update exited 0 after * seconds (glob)
log rotation
@@ -309,27 +309,27 @@ qpop
qpush with dump of tag cache
Dump the tag cache to ensure that it has exactly one head after qpush.
- $ rm -f .hg/cache/tags-visible
+ $ rm -f .hg/cache/tags2-visible
$ hg tags > /dev/null
-.hg/cache/tags-visible (pre qpush):
+.hg/cache/tags2-visible (pre qpush):
- $ cat .hg/cache/tags-visible
+ $ cat .hg/cache/tags2-visible
1 [\da-f]{40} (re)
$ hg qpush
applying test.patch
now at: test.patch
$ hg phase -r qbase
2: draft
$ hg tags > /dev/null
-.hg/cache/tags-visible (post qpush):
+.hg/cache/tags2-visible (post qpush):
- $ cat .hg/cache/tags-visible
+ $ cat .hg/cache/tags2-visible
2 [\da-f]{40} (re)
$ checkundo qpush
$ cd ..
@@ -68,11 +68,11 @@ Hiding a non-tip changeset should change
55482a6fb4b1881fa8f746fd52cf6f096bb21c89 test1
$ hg blackbox -l 4
1970/01/01 00:00:00 bob> tags
1970/01/01 00:00:00 bob> 2/2 cache hits/lookups in * seconds (glob)
- 1970/01/01 00:00:00 bob> writing tags cache file with 2 tags
+ 1970/01/01 00:00:00 bob> writing .hg/cache/tags2-visible with 2 tags
1970/01/01 00:00:00 bob> tags exited 0 after * seconds (glob)
Hiding another changeset should cause the filtered hash to change
$ hg debugobsolete -d '0 0' d75775ffbc6bca1794d300f5571272879bd280da -u dummyuser
@@ -87,11 +87,11 @@ Hiding another changeset should cause th
042eb6bfcc4909bad84a1cbf6eb1ddf0ab587d41 head2
$ hg blackbox -l 4
1970/01/01 00:00:00 bob> tags
1970/01/01 00:00:00 bob> 1/1 cache hits/lookups in * seconds (glob)
- 1970/01/01 00:00:00 bob> writing tags cache file with 1 tags
+ 1970/01/01 00:00:00 bob> writing .hg/cache/tags2-visible with 1 tags
1970/01/01 00:00:00 bob> tags exited 0 after * seconds (glob)
Resolving tags on an unfiltered repo writes a separate tags cache
$ hg --hidden tags
@@ -107,7 +107,7 @@ Resolving tags on an unfiltered repo wri
d75775ffbc6bca1794d300f5571272879bd280da test2
$ hg blackbox -l 4
1970/01/01 00:00:00 bob> --hidden tags
1970/01/01 00:00:00 bob> 2/2 cache hits/lookups in * seconds (glob)
- 1970/01/01 00:00:00 bob> writing tags cache file with 3 tags
+ 1970/01/01 00:00:00 bob> writing .hg/cache/tags2 with 3 tags
1970/01/01 00:00:00 bob> --hidden tags exited 0 after * seconds (glob)
@@ -131,11 +131,11 @@ Tag cache debug info written to blackbox
b9154636be93 tip
$ hg blackbox -l 5
1970/01/01 00:00:00 bob> identify
1970/01/01 00:00:00 bob> writing 48 bytes to cache/hgtagsfnodes1
1970/01/01 00:00:00 bob> 0/1 cache hits/lookups in * seconds (glob)
- 1970/01/01 00:00:00 bob> writing tags cache file with 1 tags
+ 1970/01/01 00:00:00 bob> writing .hg/cache/tags2-visible with 1 tags
1970/01/01 00:00:00 bob> identify exited 0 after ?.?? seconds (glob)
Failure to acquire lock results in no write
$ rm -f .hg/cache/tags2-visible .hg/cache/hgtagsfnodes1
@@ -144,11 +144,11 @@ Failure to acquire lock results in no wr
b9154636be93 tip
$ hg blackbox -l 5
1970/01/01 00:00:00 bob> identify
1970/01/01 00:00:00 bob> not writing .hg/cache/hgtagsfnodes1 because lock held
1970/01/01 00:00:00 bob> 0/1 cache hits/lookups in * seconds (glob)
- 1970/01/01 00:00:00 bob> writing tags cache file with 1 tags
+ 1970/01/01 00:00:00 bob> writing .hg/cache/tags2-visible with 1 tags
1970/01/01 00:00:00 bob> identify exited 0 after * seconds (glob)
$ fnodescacheexists
no fnodes cache
@@ -341,11 +341,11 @@ Extra junk data at the end should get ov
$ hg blackbox -l 5
1970/01/01 00:00:00 bob> tags
1970/01/01 00:00:00 bob> writing 24 bytes to cache/hgtagsfnodes1
1970/01/01 00:00:00 bob> 2/3 cache hits/lookups in * seconds (glob)
- 1970/01/01 00:00:00 bob> writing tags cache file with 1 tags
+ 1970/01/01 00:00:00 bob> writing .hg/cache/tags2-visible with 1 tags
1970/01/01 00:00:00 bob> tags exited 0 after * seconds (glob)
#if unix-permissions no-root
Errors writing to .hgtags fnodes cache are silently ignored
@@ -361,11 +361,11 @@ Errors writing to .hgtags fnodes cache a
$ hg blackbox -l 5
1970/01/01 00:00:00 bob> tags
1970/01/01 00:00:00 bob> couldn't write cache/hgtagsfnodes1: [Errno 13] Permission denied: '$TESTTMP/t2/.hg/cache/hgtagsfnodes1'
1970/01/01 00:00:00 bob> 2/3 cache hits/lookups in * seconds (glob)
- 1970/01/01 00:00:00 bob> writing tags cache file with 1 tags
+ 1970/01/01 00:00:00 bob> writing .hg/cache/tags2-visible with 1 tags
1970/01/01 00:00:00 bob> tags exited 0 after * seconds (glob)
$ chmod a+w .hg/cache/hgtagsfnodes1
#endif
@@ -376,11 +376,11 @@ Errors writing to .hgtags fnodes cache a
$ hg blackbox -l 5
1970/01/01 00:00:00 bob> tags
1970/01/01 00:00:00 bob> writing 24 bytes to cache/hgtagsfnodes1
1970/01/01 00:00:00 bob> 2/3 cache hits/lookups in * seconds (glob)
- 1970/01/01 00:00:00 bob> writing tags cache file with 1 tags
+ 1970/01/01 00:00:00 bob> writing .hg/cache/tags2-visible with 1 tags
1970/01/01 00:00:00 bob> tags exited 0 after * seconds (glob)
$ f --size .hg/cache/hgtagsfnodes1
.hg/cache/hgtagsfnodes1: size=168
@@ -392,11 +392,11 @@ Stripping doesn't truncate the tags cach
bar 1:78391a272241
$ hg blackbox -l 4
1970/01/01 00:00:00 bob> tags
1970/01/01 00:00:00 bob> 3/3 cache hits/lookups in * seconds (glob)
- 1970/01/01 00:00:00 bob> writing tags cache file with 1 tags
+ 1970/01/01 00:00:00 bob> writing .hg/cache/tags2-visible with 1 tags
1970/01/01 00:00:00 bob> tags exited 0 after * seconds (glob)
$ f --size .hg/cache/hgtagsfnodes1
.hg/cache/hgtagsfnodes1: size=168
@@ -409,11 +409,11 @@ Stripping doesn't truncate the tags cach
$ hg blackbox -l 5
1970/01/01 00:00:00 bob> tags
1970/01/01 00:00:00 bob> writing 24 bytes to cache/hgtagsfnodes1
1970/01/01 00:00:00 bob> 2/3 cache hits/lookups in * seconds (glob)
- 1970/01/01 00:00:00 bob> writing tags cache file with 1 tags
+ 1970/01/01 00:00:00 bob> writing .hg/cache/tags2-visible with 1 tags
1970/01/01 00:00:00 bob> tags exited 0 after * seconds (glob)
$ f --size .hg/cache/hgtagsfnodes1
.hg/cache/hgtagsfnodes1: size=144
$ hg -q --config extensions.strip= strip -r 5 --no-backup