equal
deleted
inserted
replaced
5 # This software may be used and distributed according to the terms of the |
5 # This software may be used and distributed according to the terms of the |
6 # GNU General Public License version 2 or any later version. |
6 # GNU General Public License version 2 or any later version. |
7 |
7 |
8 from __future__ import absolute_import |
8 from __future__ import absolute_import |
9 |
9 |
|
10 from ..thirdparty import attr |
10 from ..interfaces import repository |
11 from ..interfaces import repository |
11 |
12 |
12 # See mercurial.revlogutils.constants for doc |
13 # See mercurial.revlogutils.constants for doc |
13 COMP_MODE_INLINE = 2 |
14 COMP_MODE_INLINE = 2 |
14 |
15 |
54 sidedata_offset, |
55 sidedata_offset, |
55 sidedata_compressed_length, |
56 sidedata_compressed_length, |
56 data_compression_mode, |
57 data_compression_mode, |
57 sidedata_compression_mode, |
58 sidedata_compression_mode, |
58 ) |
59 ) |
|
60 |
|
61 |
|
62 @attr.s(slots=True, frozen=True) |
|
63 class revisioninfo(object): |
|
64 """Information about a revision that allows building its fulltext |
|
65 node: expected hash of the revision |
|
66 p1, p2: parent revs of the revision |
|
67 btext: built text cache consisting of a one-element list |
|
68 cachedelta: (baserev, uncompressed_delta) or None |
|
69 flags: flags associated to the revision storage |
|
70 |
|
71 One of btext[0] or cachedelta must be set. |
|
72 """ |
|
73 |
|
74 node = attr.ib() |
|
75 p1 = attr.ib() |
|
76 p2 = attr.ib() |
|
77 btext = attr.ib() |
|
78 textlen = attr.ib() |
|
79 cachedelta = attr.ib() |
|
80 flags = attr.ib() |