@@ -351,15 +351,16 @@ def _readtagcache(ui, repo):
# 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:
@@ -122,9 +122,9 @@ extension and python hooks - use the eol
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/tags-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)
@@ -69,9 +69,9 @@ Hiding a non-tip changeset should change
$ 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/tags-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
@@ -88,9 +88,9 @@ Hiding another changeset should cause th
$ 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/tags-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
@@ -108,6 +108,6 @@ Resolving tags on an unfiltered repo wri
$ 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/tags-unfiltered with 3 tags
1970/01/01 00:00:00 bob> --hidden tags exited 0 after * seconds (glob)
@@ -132,9 +132,9 @@ Tag cache debug info written to blackbox
$ 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/tags-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
@@ -145,9 +145,9 @@ Failure to acquire lock results in no wr
$ 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/tags-visible with 1 tags
1970/01/01 00:00:00 bob> identify exited 0 after * seconds (glob)
$ fnodescacheexists
no fnodes cache
@@ -342,9 +342,9 @@ 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/tags-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
@@ -362,9 +362,9 @@ 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/tags-visible with 1 tags
1970/01/01 00:00:00 bob> tags exited 0 after * seconds (glob)
$ chmod a+w .hg/cache/hgtagsfnodes1
#endif
@@ -377,9 +377,9 @@ 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/tags-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
@@ -393,9 +393,9 @@ Stripping doesn't truncate the tags cach
$ 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/tags-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
@@ -410,9 +410,9 @@ 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/tags-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