This avoid leaking python-3.6 compatibility details too much.
Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Branch
- default
- Lint
No Linters Available - Unit
No Unit Test Coverage
This avoid leaking python-3.6 compatibility details too much.
No Linters Available |
No Unit Test Coverage |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/revlogutils/constants.py (4 lines) | |||
M | mercurial/revlogutils/docket.py (4 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
43d63dda5503 | 2cc80d2ea224 | Pierre-Yves David | Jun 1 2021, 10:03 PM |
Status | Author | Revision | |
---|---|---|---|
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute |
KIND_CHANGELOG, | KIND_CHANGELOG, | ||||
KIND_MANIFESTLOG, | KIND_MANIFESTLOG, | ||||
KIND_FILELOG, | KIND_FILELOG, | ||||
KIND_OTHER, | KIND_OTHER, | ||||
} | } | ||||
### main revlog header | ### main revlog header | ||||
INDEX_HEADER = struct.Struct(b">I") | # We cannot rely on Struct.format is inconsistent for python <=3.6 versus above | ||||
INDEX_HEADER_FMT = b">I" | |||||
INDEX_HEADER = struct.Struct(INDEX_HEADER_FMT) | |||||
## revlog version | ## revlog version | ||||
REVLOGV0 = 0 | REVLOGV0 = 0 | ||||
REVLOGV1 = 1 | REVLOGV1 = 1 | ||||
# Dummy value until file format is finalized. | # Dummy value until file format is finalized. | ||||
REVLOGV2 = 0xDEAD | REVLOGV2 = 0xDEAD | ||||
# Dummy value until file format is finalized. | # Dummy value until file format is finalized. | ||||
CHANGELOGV2 = 0xD34D | CHANGELOGV2 = 0xD34D |
# | revlog index header. | # | revlog index header. | ||||
# * 1 bytes: size of index uuid | # * 1 bytes: size of index uuid | ||||
# * 1 bytes: size of data uuid | # * 1 bytes: size of data uuid | ||||
# * 8 bytes: size of index-data | # * 8 bytes: size of index-data | ||||
# * 8 bytes: pending size of index-data | # * 8 bytes: pending size of index-data | ||||
# * 8 bytes: size of data | # * 8 bytes: size of data | ||||
# * 8 bytes: pending size of data | # * 8 bytes: pending size of data | ||||
# * 1 bytes: default compression header | # * 1 bytes: default compression header | ||||
S_HEADER = struct.Struct( | S_HEADER = struct.Struct(constants.INDEX_HEADER_FMT + b'BBLLLLc') | ||||
pycompat.sysstr(constants.INDEX_HEADER.format) + 'BBLLLLc' | |||||
) | |||||
class RevlogDocket(object): | class RevlogDocket(object): | ||||
"""metadata associated with revlog""" | """metadata associated with revlog""" | ||||
def __init__( | def __init__( | ||||
self, | self, | ||||
revlog, | revlog, |