Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/debugcommands.py @ 48850:308e45f7b455 stable
debugcommands: remove `debugdirstateignorepatternhash`
This is replaced by the more complete `--docket` option to `debugstate`.
Differential Revision: https://phab.mercurial-scm.org/D12591
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Thu, 28 Apr 2022 15:22:08 +0200 |
parents | eaaf4f98c9f1 |
children | a932cad26d37 |
comparison
equal
deleted
inserted
replaced
48849:eaaf4f98c9f1 | 48850:308e45f7b455 |
---|---|
1016 for f in repo.dirstate.copies(): | 1016 for f in repo.dirstate.copies(): |
1017 ui.write(_(b"copy: %s -> %s\n") % (repo.dirstate.copied(f), f)) | 1017 ui.write(_(b"copy: %s -> %s\n") % (repo.dirstate.copied(f), f)) |
1018 | 1018 |
1019 | 1019 |
1020 @command( | 1020 @command( |
1021 b'debugdirstateignorepatternshash', | |
1022 [], | |
1023 _(b''), | |
1024 ) | |
1025 def debugdirstateignorepatternshash(ui, repo, **opts): | |
1026 """show the hash of ignore patterns stored in dirstate if v2, | |
1027 or nothing for dirstate-v2 | |
1028 """ | |
1029 if repo.dirstate._use_dirstate_v2: | |
1030 docket = repo.dirstate._map.docket | |
1031 hash_len = 20 # 160 bits for SHA-1 | |
1032 hash_bytes = docket.tree_metadata[-hash_len:] | |
1033 ui.write(binascii.hexlify(hash_bytes) + b'\n') | |
1034 | |
1035 | |
1036 @command( | |
1037 b'debugdiscovery', | 1021 b'debugdiscovery', |
1038 [ | 1022 [ |
1039 (b'', b'old', None, _(b'use old-style discovery')), | 1023 (b'', b'old', None, _(b'use old-style discovery')), |
1040 ( | 1024 ( |
1041 b'', | 1025 b'', |