Details
Details
- Reviewers
pulkit - Group Reviewers
hg-reviewers - Commits
- rHG98c816e89fac: nodemap: convert error message to bytes
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Branch
- stable
- Lint
No Linters Available - Unit
No Unit Test Coverage
( )
pulkit |
hg-reviewers |
No Linters Available |
No Unit Test Coverage |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/revlogutils/nodemap.py (2 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
7068423e6e88 | 44ce3f01ba39 | Matt Harbison | Mar 11 2021, 5:05 PM |
Status | Author | Revision | |
---|---|---|---|
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 |
return block_map[id(item)] | return block_map[id(item)] | ||||
else: | else: | ||||
return _transform_rev(item) | return _transform_rev(item) | ||||
def parse_data(data): | def parse_data(data): | ||||
"""parse parse nodemap data into a nodemap Trie""" | """parse parse nodemap data into a nodemap Trie""" | ||||
if (len(data) % S_BLOCK.size) != 0: | if (len(data) % S_BLOCK.size) != 0: | ||||
msg = "nodemap data size is not a multiple of block size (%d): %d" | msg = b"nodemap data size is not a multiple of block size (%d): %d" | ||||
raise error.Abort(msg % (S_BLOCK.size, len(data))) | raise error.Abort(msg % (S_BLOCK.size, len(data))) | ||||
if not data: | if not data: | ||||
return Block(), None | return Block(), None | ||||
block_map = {} | block_map = {} | ||||
new_blocks = [] | new_blocks = [] | ||||
for i in range(0, len(data), S_BLOCK.size): | for i in range(0, len(data), S_BLOCK.size): | ||||
block = Block() | block = Block() | ||||
block.ondisk_id = len(block_map) | block.ondisk_id = len(block_map) |