Show More
@@ -167,27 +167,6 b' HAS_FAST_PERSISTENT_NODEMAP = rustrevlog' | |||
|
167 | 167 | ) |
|
168 | 168 | |
|
169 | 169 | |
|
170 | @attr.s(slots=True, frozen=True) | |
|
171 | class _revisioninfo(object): | |
|
172 | """Information about a revision that allows building its fulltext | |
|
173 | node: expected hash of the revision | |
|
174 | p1, p2: parent revs of the revision | |
|
175 | btext: built text cache consisting of a one-element list | |
|
176 | cachedelta: (baserev, uncompressed_delta) or None | |
|
177 | flags: flags associated to the revision storage | |
|
178 | ||
|
179 | One of btext[0] or cachedelta must be set. | |
|
180 | """ | |
|
181 | ||
|
182 | node = attr.ib() | |
|
183 | p1 = attr.ib() | |
|
184 | p2 = attr.ib() | |
|
185 | btext = attr.ib() | |
|
186 | textlen = attr.ib() | |
|
187 | cachedelta = attr.ib() | |
|
188 | flags = attr.ib() | |
|
189 | ||
|
190 | ||
|
191 | 170 | @interfaceutil.implementer(repository.irevisiondelta) |
|
192 | 171 | @attr.s(slots=True) |
|
193 | 172 | class revlogrevisiondelta(object): |
@@ -2534,7 +2513,15 b' class revlog(object):' | |||
|
2534 | 2513 | if deltacomputer is None: |
|
2535 | 2514 | deltacomputer = deltautil.deltacomputer(self) |
|
2536 | 2515 | |
|
2537 | revinfo = _revisioninfo(node, p1, p2, btext, textlen, cachedelta, flags) | |
|
2516 | revinfo = revlogutils.revisioninfo( | |
|
2517 | node, | |
|
2518 | p1, | |
|
2519 | p2, | |
|
2520 | btext, | |
|
2521 | textlen, | |
|
2522 | cachedelta, | |
|
2523 | flags, | |
|
2524 | ) | |
|
2538 | 2525 | |
|
2539 | 2526 | deltainfo = deltacomputer.finddeltainfo(revinfo, fh) |
|
2540 | 2527 |
@@ -7,6 +7,7 b'' | |||
|
7 | 7 | |
|
8 | 8 | from __future__ import absolute_import |
|
9 | 9 | |
|
10 | from ..thirdparty import attr | |
|
10 | 11 | from ..interfaces import repository |
|
11 | 12 | |
|
12 | 13 | # See mercurial.revlogutils.constants for doc |
@@ -56,3 +57,24 b' def entry(' | |||
|
56 | 57 | data_compression_mode, |
|
57 | 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() |
@@ -932,7 +932,7 b' class deltacomputer(object):' | |||
|
932 | 932 | def buildtext(self, revinfo, fh): |
|
933 | 933 | """Builds a fulltext version of a revision |
|
934 | 934 | |
|
935 |
revinfo: |
|
|
935 | revinfo: revisioninfo instance that contains all needed info | |
|
936 | 936 | fh: file handle to either the .i or the .d revlog file, |
|
937 | 937 | depending on whether it is inlined or not |
|
938 | 938 | """ |
General Comments 0
You need to be logged in to leave comments.
Login now