Show More
@@ -355,13 +355,14 b' def _readtagcache(ui, repo):' | |||||
355 | return (repoheads, cachefnode, valid, None, True) |
|
355 | return (repoheads, cachefnode, valid, None, True) | |
356 |
|
356 | |||
357 | def _writetagcache(ui, repo, valid, cachetags): |
|
357 | def _writetagcache(ui, repo, valid, cachetags): | |
|
358 | filename = _filename(repo) | |||
358 | try: |
|
359 | try: | |
359 |
cachefile = repo.vfs( |
|
360 | cachefile = repo.vfs(filename, 'w', atomictemp=True) | |
360 | except (OSError, IOError): |
|
361 | except (OSError, IOError): | |
361 | return |
|
362 | return | |
362 |
|
363 | |||
363 |
ui.log('tagscache', 'writing |
|
364 | ui.log('tagscache', 'writing .hg/%s with %d tags\n', | |
364 | len(cachetags)) |
|
365 | filename, len(cachetags)) | |
365 |
|
366 | |||
366 | if valid[2]: |
|
367 | if valid[2]: | |
367 | cachefile.write('%d %s %s\n' % (valid[0], hex(valid[1]), hex(valid[2]))) |
|
368 | cachefile.write('%d %s %s\n' % (valid[0], hex(valid[1]), hex(valid[2]))) |
@@ -123,7 +123,7 b' extension and python hooks - use the eol' | |||||
123 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
123 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
124 | $ hg blackbox -l 5 |
|
124 | $ hg blackbox -l 5 | |
125 | 1970/01/01 00:00:00 bob> update |
|
125 | 1970/01/01 00:00:00 bob> update | |
126 |
1970/01/01 00:00:00 bob> writing |
|
126 | 1970/01/01 00:00:00 bob> writing .hg/cache/tags2-visible with 0 tags | |
127 | 1970/01/01 00:00:00 bob> pythonhook-preupdate: hgext.eol.preupdate finished in * seconds (glob) |
|
127 | 1970/01/01 00:00:00 bob> pythonhook-preupdate: hgext.eol.preupdate finished in * seconds (glob) | |
128 | 1970/01/01 00:00:00 bob> exthook-update: echo hooked finished in * seconds (glob) |
|
128 | 1970/01/01 00:00:00 bob> exthook-update: echo hooked finished in * seconds (glob) | |
129 | 1970/01/01 00:00:00 bob> update exited 0 after * seconds (glob) |
|
129 | 1970/01/01 00:00:00 bob> update exited 0 after * seconds (glob) |
@@ -311,12 +311,12 b' qpop' | |||||
311 | qpush with dump of tag cache |
|
311 | qpush with dump of tag cache | |
312 | Dump the tag cache to ensure that it has exactly one head after qpush. |
|
312 | Dump the tag cache to ensure that it has exactly one head after qpush. | |
313 |
|
313 | |||
314 | $ rm -f .hg/cache/tags-visible |
|
314 | $ rm -f .hg/cache/tags2-visible | |
315 | $ hg tags > /dev/null |
|
315 | $ hg tags > /dev/null | |
316 |
|
316 | |||
317 | .hg/cache/tags-visible (pre qpush): |
|
317 | .hg/cache/tags2-visible (pre qpush): | |
318 |
|
318 | |||
319 | $ cat .hg/cache/tags-visible |
|
319 | $ cat .hg/cache/tags2-visible | |
320 | 1 [\da-f]{40} (re) |
|
320 | 1 [\da-f]{40} (re) | |
321 | $ hg qpush |
|
321 | $ hg qpush | |
322 | applying test.patch |
|
322 | applying test.patch | |
@@ -325,9 +325,9 b' Dump the tag cache to ensure that it has' | |||||
325 | 2: draft |
|
325 | 2: draft | |
326 | $ hg tags > /dev/null |
|
326 | $ hg tags > /dev/null | |
327 |
|
327 | |||
328 | .hg/cache/tags-visible (post qpush): |
|
328 | .hg/cache/tags2-visible (post qpush): | |
329 |
|
329 | |||
330 | $ cat .hg/cache/tags-visible |
|
330 | $ cat .hg/cache/tags2-visible | |
331 | 2 [\da-f]{40} (re) |
|
331 | 2 [\da-f]{40} (re) | |
332 | $ checkundo qpush |
|
332 | $ checkundo qpush | |
333 | $ cd .. |
|
333 | $ cd .. |
@@ -70,7 +70,7 b' Hiding a non-tip changeset should change' | |||||
70 | $ hg blackbox -l 4 |
|
70 | $ hg blackbox -l 4 | |
71 | 1970/01/01 00:00:00 bob> tags |
|
71 | 1970/01/01 00:00:00 bob> tags | |
72 | 1970/01/01 00:00:00 bob> 2/2 cache hits/lookups in * seconds (glob) |
|
72 | 1970/01/01 00:00:00 bob> 2/2 cache hits/lookups in * seconds (glob) | |
73 |
1970/01/01 00:00:00 bob> writing |
|
73 | 1970/01/01 00:00:00 bob> writing .hg/cache/tags2-visible with 2 tags | |
74 | 1970/01/01 00:00:00 bob> tags exited 0 after * seconds (glob) |
|
74 | 1970/01/01 00:00:00 bob> tags exited 0 after * seconds (glob) | |
75 |
|
75 | |||
76 | Hiding another changeset should cause the filtered hash to change |
|
76 | Hiding another changeset should cause the filtered hash to change | |
@@ -89,7 +89,7 b' Hiding another changeset should cause th' | |||||
89 | $ hg blackbox -l 4 |
|
89 | $ hg blackbox -l 4 | |
90 | 1970/01/01 00:00:00 bob> tags |
|
90 | 1970/01/01 00:00:00 bob> tags | |
91 | 1970/01/01 00:00:00 bob> 1/1 cache hits/lookups in * seconds (glob) |
|
91 | 1970/01/01 00:00:00 bob> 1/1 cache hits/lookups in * seconds (glob) | |
92 |
1970/01/01 00:00:00 bob> writing |
|
92 | 1970/01/01 00:00:00 bob> writing .hg/cache/tags2-visible with 1 tags | |
93 | 1970/01/01 00:00:00 bob> tags exited 0 after * seconds (glob) |
|
93 | 1970/01/01 00:00:00 bob> tags exited 0 after * seconds (glob) | |
94 |
|
94 | |||
95 | Resolving tags on an unfiltered repo writes a separate tags cache |
|
95 | Resolving tags on an unfiltered repo writes a separate tags cache | |
@@ -109,5 +109,5 b' Resolving tags on an unfiltered repo wri' | |||||
109 | $ hg blackbox -l 4 |
|
109 | $ hg blackbox -l 4 | |
110 | 1970/01/01 00:00:00 bob> --hidden tags |
|
110 | 1970/01/01 00:00:00 bob> --hidden tags | |
111 | 1970/01/01 00:00:00 bob> 2/2 cache hits/lookups in * seconds (glob) |
|
111 | 1970/01/01 00:00:00 bob> 2/2 cache hits/lookups in * seconds (glob) | |
112 |
1970/01/01 00:00:00 bob> writing |
|
112 | 1970/01/01 00:00:00 bob> writing .hg/cache/tags2 with 3 tags | |
113 | 1970/01/01 00:00:00 bob> --hidden tags exited 0 after * seconds (glob) |
|
113 | 1970/01/01 00:00:00 bob> --hidden tags exited 0 after * seconds (glob) |
@@ -133,7 +133,7 b' Tag cache debug info written to blackbox' | |||||
133 | 1970/01/01 00:00:00 bob> identify |
|
133 | 1970/01/01 00:00:00 bob> identify | |
134 | 1970/01/01 00:00:00 bob> writing 48 bytes to cache/hgtagsfnodes1 |
|
134 | 1970/01/01 00:00:00 bob> writing 48 bytes to cache/hgtagsfnodes1 | |
135 | 1970/01/01 00:00:00 bob> 0/1 cache hits/lookups in * seconds (glob) |
|
135 | 1970/01/01 00:00:00 bob> 0/1 cache hits/lookups in * seconds (glob) | |
136 |
1970/01/01 00:00:00 bob> writing |
|
136 | 1970/01/01 00:00:00 bob> writing .hg/cache/tags2-visible with 1 tags | |
137 | 1970/01/01 00:00:00 bob> identify exited 0 after ?.?? seconds (glob) |
|
137 | 1970/01/01 00:00:00 bob> identify exited 0 after ?.?? seconds (glob) | |
138 |
|
138 | |||
139 | Failure to acquire lock results in no write |
|
139 | Failure to acquire lock results in no write | |
@@ -146,7 +146,7 b' Failure to acquire lock results in no wr' | |||||
146 | 1970/01/01 00:00:00 bob> identify |
|
146 | 1970/01/01 00:00:00 bob> identify | |
147 | 1970/01/01 00:00:00 bob> not writing .hg/cache/hgtagsfnodes1 because lock held |
|
147 | 1970/01/01 00:00:00 bob> not writing .hg/cache/hgtagsfnodes1 because lock held | |
148 | 1970/01/01 00:00:00 bob> 0/1 cache hits/lookups in * seconds (glob) |
|
148 | 1970/01/01 00:00:00 bob> 0/1 cache hits/lookups in * seconds (glob) | |
149 |
1970/01/01 00:00:00 bob> writing |
|
149 | 1970/01/01 00:00:00 bob> writing .hg/cache/tags2-visible with 1 tags | |
150 | 1970/01/01 00:00:00 bob> identify exited 0 after * seconds (glob) |
|
150 | 1970/01/01 00:00:00 bob> identify exited 0 after * seconds (glob) | |
151 |
|
151 | |||
152 | $ fnodescacheexists |
|
152 | $ fnodescacheexists | |
@@ -343,7 +343,7 b' Extra junk data at the end should get ov' | |||||
343 | 1970/01/01 00:00:00 bob> tags |
|
343 | 1970/01/01 00:00:00 bob> tags | |
344 | 1970/01/01 00:00:00 bob> writing 24 bytes to cache/hgtagsfnodes1 |
|
344 | 1970/01/01 00:00:00 bob> writing 24 bytes to cache/hgtagsfnodes1 | |
345 | 1970/01/01 00:00:00 bob> 2/3 cache hits/lookups in * seconds (glob) |
|
345 | 1970/01/01 00:00:00 bob> 2/3 cache hits/lookups in * seconds (glob) | |
346 |
1970/01/01 00:00:00 bob> writing |
|
346 | 1970/01/01 00:00:00 bob> writing .hg/cache/tags2-visible with 1 tags | |
347 | 1970/01/01 00:00:00 bob> tags exited 0 after * seconds (glob) |
|
347 | 1970/01/01 00:00:00 bob> tags exited 0 after * seconds (glob) | |
348 |
|
348 | |||
349 | #if unix-permissions no-root |
|
349 | #if unix-permissions no-root | |
@@ -363,7 +363,7 b' Errors writing to .hgtags fnodes cache a' | |||||
363 | 1970/01/01 00:00:00 bob> tags |
|
363 | 1970/01/01 00:00:00 bob> tags | |
364 | 1970/01/01 00:00:00 bob> couldn't write cache/hgtagsfnodes1: [Errno 13] Permission denied: '$TESTTMP/t2/.hg/cache/hgtagsfnodes1' |
|
364 | 1970/01/01 00:00:00 bob> couldn't write cache/hgtagsfnodes1: [Errno 13] Permission denied: '$TESTTMP/t2/.hg/cache/hgtagsfnodes1' | |
365 | 1970/01/01 00:00:00 bob> 2/3 cache hits/lookups in * seconds (glob) |
|
365 | 1970/01/01 00:00:00 bob> 2/3 cache hits/lookups in * seconds (glob) | |
366 |
1970/01/01 00:00:00 bob> writing |
|
366 | 1970/01/01 00:00:00 bob> writing .hg/cache/tags2-visible with 1 tags | |
367 | 1970/01/01 00:00:00 bob> tags exited 0 after * seconds (glob) |
|
367 | 1970/01/01 00:00:00 bob> tags exited 0 after * seconds (glob) | |
368 |
|
368 | |||
369 | $ chmod a+w .hg/cache/hgtagsfnodes1 |
|
369 | $ chmod a+w .hg/cache/hgtagsfnodes1 | |
@@ -378,7 +378,7 b' Errors writing to .hgtags fnodes cache a' | |||||
378 | 1970/01/01 00:00:00 bob> tags |
|
378 | 1970/01/01 00:00:00 bob> tags | |
379 | 1970/01/01 00:00:00 bob> writing 24 bytes to cache/hgtagsfnodes1 |
|
379 | 1970/01/01 00:00:00 bob> writing 24 bytes to cache/hgtagsfnodes1 | |
380 | 1970/01/01 00:00:00 bob> 2/3 cache hits/lookups in * seconds (glob) |
|
380 | 1970/01/01 00:00:00 bob> 2/3 cache hits/lookups in * seconds (glob) | |
381 |
1970/01/01 00:00:00 bob> writing |
|
381 | 1970/01/01 00:00:00 bob> writing .hg/cache/tags2-visible with 1 tags | |
382 | 1970/01/01 00:00:00 bob> tags exited 0 after * seconds (glob) |
|
382 | 1970/01/01 00:00:00 bob> tags exited 0 after * seconds (glob) | |
383 |
|
383 | |||
384 | $ f --size .hg/cache/hgtagsfnodes1 |
|
384 | $ f --size .hg/cache/hgtagsfnodes1 | |
@@ -394,7 +394,7 b" Stripping doesn't truncate the tags cach" | |||||
394 | $ hg blackbox -l 4 |
|
394 | $ hg blackbox -l 4 | |
395 | 1970/01/01 00:00:00 bob> tags |
|
395 | 1970/01/01 00:00:00 bob> tags | |
396 | 1970/01/01 00:00:00 bob> 3/3 cache hits/lookups in * seconds (glob) |
|
396 | 1970/01/01 00:00:00 bob> 3/3 cache hits/lookups in * seconds (glob) | |
397 |
1970/01/01 00:00:00 bob> writing |
|
397 | 1970/01/01 00:00:00 bob> writing .hg/cache/tags2-visible with 1 tags | |
398 | 1970/01/01 00:00:00 bob> tags exited 0 after * seconds (glob) |
|
398 | 1970/01/01 00:00:00 bob> tags exited 0 after * seconds (glob) | |
399 |
|
399 | |||
400 | $ f --size .hg/cache/hgtagsfnodes1 |
|
400 | $ f --size .hg/cache/hgtagsfnodes1 | |
@@ -411,7 +411,7 b" Stripping doesn't truncate the tags cach" | |||||
411 | 1970/01/01 00:00:00 bob> tags |
|
411 | 1970/01/01 00:00:00 bob> tags | |
412 | 1970/01/01 00:00:00 bob> writing 24 bytes to cache/hgtagsfnodes1 |
|
412 | 1970/01/01 00:00:00 bob> writing 24 bytes to cache/hgtagsfnodes1 | |
413 | 1970/01/01 00:00:00 bob> 2/3 cache hits/lookups in * seconds (glob) |
|
413 | 1970/01/01 00:00:00 bob> 2/3 cache hits/lookups in * seconds (glob) | |
414 |
1970/01/01 00:00:00 bob> writing |
|
414 | 1970/01/01 00:00:00 bob> writing .hg/cache/tags2-visible with 1 tags | |
415 | 1970/01/01 00:00:00 bob> tags exited 0 after * seconds (glob) |
|
415 | 1970/01/01 00:00:00 bob> tags exited 0 after * seconds (glob) | |
416 | $ f --size .hg/cache/hgtagsfnodes1 |
|
416 | $ f --size .hg/cache/hgtagsfnodes1 | |
417 | .hg/cache/hgtagsfnodes1: size=144 |
|
417 | .hg/cache/hgtagsfnodes1: size=144 |
General Comments 0
You need to be logged in to leave comments.
Login now