Mercurial > public > mercurial-scm > hg
comparison mercurial/revlogutils/debug.py @ 49256:d910ca4e995b
debugindex: add a `p2-rev` column
This will be useful in case of corrupted index.
author | Pierre-Yves DAVID <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 01 Jun 2022 01:32:54 +0200 |
parents | 251650844331 |
children | b0238fc496af |
comparison
equal
deleted
inserted
replaced
49255:251650844331 | 49256:d910ca4e995b |
---|---|
90 parent = entry[constants.ENTRY_PARENT_1] | 90 parent = entry[constants.ENTRY_PARENT_1] |
91 p_entry = index[parent] | 91 p_entry = index[parent] |
92 return hexfn(p_entry[constants.ENTRY_NODE_ID]) | 92 return hexfn(p_entry[constants.ENTRY_NODE_ID]) |
93 | 93 |
94 | 94 |
95 @debug_column(b"p2-rev", size=6, verbose=True) | |
96 def _p2_rev(index, rev, entry, hexfn): | |
97 return b"%d" % entry[constants.ENTRY_PARENT_2] | |
98 | |
99 | |
95 @debug_column(b"p2-nodeid", size=NODE_SIZE) | 100 @debug_column(b"p2-nodeid", size=NODE_SIZE) |
96 def _p2_node(index, rev, entry, hexfn): | 101 def _p2_node(index, rev, entry, hexfn): |
97 parent = entry[constants.ENTRY_PARENT_2] | 102 parent = entry[constants.ENTRY_PARENT_2] |
98 p_entry = index[parent] | 103 p_entry = index[parent] |
99 return hexfn(p_entry[constants.ENTRY_NODE_ID]) | 104 return hexfn(p_entry[constants.ENTRY_NODE_ID]) |