comparison mercurial/revlogutils/debug.py @ 49261:7ba8adced391

debugindex: add a `data-offset` column
author Pierre-Yves DAVID <pierre-yves.david@octobus.net>
date Wed, 01 Jun 2022 01:33:13 +0200
parents 7a18f6fc7e0c
children 4c145006b24a
comparison
equal deleted inserted replaced
49260:7a18f6fc7e0c 49261:7ba8adced391
124 @debug_column(b"comp-mode", size=4, verbose=True) 124 @debug_column(b"comp-mode", size=4, verbose=True)
125 def compression_mode(index, rev, entry, hexfn): 125 def compression_mode(index, rev, entry, hexfn):
126 return b"%d" % entry[constants.ENTRY_DATA_COMPRESSION_MODE] 126 return b"%d" % entry[constants.ENTRY_DATA_COMPRESSION_MODE]
127 127
128 128
129 @debug_column(b"data-offset", size=20, verbose=True)
130 def data_offset(index, rev, entry, hexfn):
131 field = entry[constants.ENTRY_DATA_OFFSET]
132 field >>= 16
133 return b"%d" % field
134
135
129 def debug_index( 136 def debug_index(
130 ui, 137 ui,
131 repo, 138 repo,
132 formatter, 139 formatter,
133 revlog, 140 revlog,