equal
deleted
inserted
replaced
10 from ..thirdparty import attr |
10 from ..thirdparty import attr |
11 from ..interfaces import repository |
11 from ..interfaces import repository |
12 |
12 |
13 # See mercurial.revlogutils.constants for doc |
13 # See mercurial.revlogutils.constants for doc |
14 COMP_MODE_INLINE = 2 |
14 COMP_MODE_INLINE = 2 |
|
15 RANK_UNKNOWN = -1 |
15 |
16 |
16 |
17 |
17 def offset_type(offset, type): |
18 def offset_type(offset, type): |
18 if (type & ~repository.REVISION_FLAGS_KNOWN) != 0: |
19 if (type & ~repository.REVISION_FLAGS_KNOWN) != 0: |
19 raise ValueError(b'unknown revlog index flags: %d' % type) |
20 raise ValueError(b'unknown revlog index flags: %d' % type) |
32 data_uncompressed_length=-1, |
33 data_uncompressed_length=-1, |
33 data_compression_mode=COMP_MODE_INLINE, |
34 data_compression_mode=COMP_MODE_INLINE, |
34 sidedata_offset=0, |
35 sidedata_offset=0, |
35 sidedata_compressed_length=0, |
36 sidedata_compressed_length=0, |
36 sidedata_compression_mode=COMP_MODE_INLINE, |
37 sidedata_compression_mode=COMP_MODE_INLINE, |
|
38 rank=RANK_UNKNOWN, |
37 ): |
39 ): |
38 """Build one entry from symbolic name |
40 """Build one entry from symbolic name |
39 |
41 |
40 This is useful to abstract the actual detail of how we build the entry |
42 This is useful to abstract the actual detail of how we build the entry |
41 tuple for caller who don't care about it. |
43 tuple for caller who don't care about it. |
54 node_id, |
56 node_id, |
55 sidedata_offset, |
57 sidedata_offset, |
56 sidedata_compressed_length, |
58 sidedata_compressed_length, |
57 data_compression_mode, |
59 data_compression_mode, |
58 sidedata_compression_mode, |
60 sidedata_compression_mode, |
|
61 rank, |
59 ) |
62 ) |
60 |
63 |
61 |
64 |
62 @attr.s(slots=True, frozen=True) |
65 @attr.s(slots=True, frozen=True) |
63 class revisioninfo(object): |
66 class revisioninfo(object): |