415 |
415 |
416 $ hg tags |
416 $ hg tags |
417 tip 5:8dbfe60eff30 |
417 tip 5:8dbfe60eff30 |
418 bar 1:78391a272241 |
418 bar 1:78391a272241 |
419 |
419 |
|
420 BUG: If the filenode part of an entry in hgtagsfnodes is corrupt and |
|
421 tags2-visible is missing, `hg tags` aborts. Corrupting the leading 4 bytes of |
|
422 node hash (as above) doesn't seem to trigger the issue. Also note that the |
|
423 debug command hides the corruption, both with and without tags2-visible. |
|
424 |
|
425 $ mv .hg/cache/hgtagsfnodes1 .hg/cache/hgtagsfnodes1.bak |
|
426 $ hg debugupdatecaches |
|
427 |
|
428 >>> import os |
|
429 >>> with open(".hg/cache/hgtagsfnodes1", "rb+") as fp: |
|
430 ... fp.seek(-16, os.SEEK_END) and None |
|
431 ... fp.write(b'\xde\xad') and None |
|
432 |
|
433 $ f --size --hexdump .hg/cache/hgtagsfnodes1 |
|
434 .hg/cache/hgtagsfnodes1: size=144 |
|
435 0000: bb d1 79 df 00 00 00 00 00 00 00 00 00 00 00 00 |..y.............| |
|
436 0010: 00 00 00 00 00 00 00 00 78 39 1a 27 0c 04 f2 a8 |........x9.'....| |
|
437 0020: af 31 de 17 fa b7 42 28 78 ee 5a 2d ad bc 94 3d |.1....B(x.Z-...=| |
|
438 0030: 7a 94 12 77 0c 04 f2 a8 af 31 de 17 fa b7 42 28 |z..w.....1....B(| |
|
439 0040: 78 ee 5a 2d ad bc 94 3d 6f a4 50 21 7d 3b 71 8c |x.Z-...=o.P!};q.| |
|
440 0050: 96 4e f3 7b 89 e5 50 eb da fd 57 89 e7 6c e1 b0 |.N.{..P...W..l..| |
|
441 0060: 0c 19 2d 7d 0c 04 f2 a8 af 31 de 17 fa b7 42 28 |..-}.....1....B(| |
|
442 0070: 78 ee 5a 2d ad bc 94 3d 8d bf e6 0e 0c 04 f2 a8 |x.Z-...=........| |
|
443 0080: de ad de 17 fa b7 42 28 78 ee 5a 2d ad bc 94 3d |......B(x.Z-...=| |
|
444 |
|
445 $ hg debugtagscache | tail -2 |
|
446 4 0c192d7d5e6b78a714de54a2e9627952a877e25a 0c04f2a8af31de17fab7422878ee5a2dadbc943d |
|
447 5 8dbfe60eff306a54259cfe007db9e330e7ecf866 0c04f2a8deadde17fab7422878ee5a2dadbc943d |
|
448 |
|
449 $ rm -f .hg/cache/tags2-visible |
|
450 $ hg debugtagscache | tail -2 |
|
451 4 0c192d7d5e6b78a714de54a2e9627952a877e25a 0c04f2a8af31de17fab7422878ee5a2dadbc943d |
|
452 5 8dbfe60eff306a54259cfe007db9e330e7ecf866 0c04f2a8deadde17fab7422878ee5a2dadbc943d |
|
453 |
|
454 $ hg tags |
|
455 abort: data/.hgtags.i@0c04f2a8deadde17fab7422878ee5a2dadbc943d: no match found |
|
456 [50] |
|
457 |
|
458 BUG: Unless this file is restored, the `hg tags` in the next unix-permissions |
|
459 conditional will fail: "abort: data/.hgtags.i@0c04f2a8dead: no match found" |
|
460 |
|
461 $ mv .hg/cache/hgtagsfnodes1.bak .hg/cache/hgtagsfnodes1 |
|
462 |
420 #if unix-permissions no-root |
463 #if unix-permissions no-root |
421 Errors writing to .hgtags fnodes cache are silently ignored |
464 Errors writing to .hgtags fnodes cache are silently ignored |
422 |
465 |
423 $ echo dummy2 > foo |
466 $ echo dummy2 > foo |
424 $ hg commit -m throwaway2 |
467 $ hg commit -m throwaway2 |