Show More
@@ -407,6 +407,9 b' class _deltacomputer(object):' | |||||
407 | for candidaterevs in self._getcandidaterevs(p1, p2, cachedelta): |
|
407 | for candidaterevs in self._getcandidaterevs(p1, p2, cachedelta): | |
408 | nominateddeltas = [] |
|
408 | nominateddeltas = [] | |
409 | for candidaterev in candidaterevs: |
|
409 | for candidaterev in candidaterevs: | |
|
410 | # no delta for rawtext-changing revs (see "candelta" for why) | |||
|
411 | if revlog.flags(candidaterev) & REVIDX_RAWTEXT_CHANGING_FLAGS: | |||
|
412 | continue | |||
410 | candidatedelta = self._builddeltainfo(revinfo, candidaterev, fh) |
|
413 | candidatedelta = self._builddeltainfo(revinfo, candidaterev, fh) | |
411 | if revlog._isgooddeltainfo(candidatedelta, revinfo.textlen): |
|
414 | if revlog._isgooddeltainfo(candidatedelta, revinfo.textlen): | |
412 | nominateddeltas.append(candidatedelta) |
|
415 | nominateddeltas.append(candidatedelta) | |
@@ -2090,7 +2093,14 b' class revlog(object):' | |||||
2090 | deltacomputer = _deltacomputer(self) |
|
2093 | deltacomputer = _deltacomputer(self) | |
2091 |
|
2094 | |||
2092 | revinfo = _revisioninfo(node, p1, p2, btext, textlen, cachedelta, flags) |
|
2095 | revinfo = _revisioninfo(node, p1, p2, btext, textlen, cachedelta, flags) | |
2093 | deltainfo = deltacomputer.finddeltainfo(revinfo, fh) |
|
2096 | ||
|
2097 | # no delta for flag processor revision (see "candelta" for why) | |||
|
2098 | # not calling candelta since only one revision needs test, also to | |||
|
2099 | # avoid overhead fetching flags again. | |||
|
2100 | if flags & REVIDX_RAWTEXT_CHANGING_FLAGS: | |||
|
2101 | deltainfo = None | |||
|
2102 | else: | |||
|
2103 | deltainfo = deltacomputer.finddeltainfo(revinfo, fh) | |||
2094 |
|
2104 | |||
2095 | if deltainfo is not None: |
|
2105 | if deltainfo is not None: | |
2096 | base = deltainfo.base |
|
2106 | base = deltainfo.base |
@@ -90,10 +90,7 b' Apply bundles' | |||||
90 | ---- Applying src-normal.bundle to dst-normal ---- |
|
90 | ---- Applying src-normal.bundle to dst-normal ---- | |
91 | OK |
|
91 | OK | |
92 | ---- Applying src-normal.bundle to dst-lfs ---- |
|
92 | ---- Applying src-normal.bundle to dst-lfs ---- | |
93 | X@2: unpacking bcc7d23fa6b7: integrity check failed on data/X.i:2 |
|
93 | CRASHED | |
94 | Y@2: unpacking 46017a6640e7: integrity check failed on data/Y.i:2 |
|
|||
95 | 2 integrity errors encountered! |
|
|||
96 | (first damaged changeset appears to be 2) |
|
|||
97 |
|
|
94 | ---- Applying src-lfs.bundle to dst-normal ---- | |
98 | OK |
|
95 | OK | |
99 | ---- Applying src-lfs.bundle to dst-lfs ---- |
|
96 | ---- Applying src-lfs.bundle to dst-lfs ---- |
@@ -114,6 +114,8 b" def addgroupcopy(rlog, tr, destname=b'_d" | |||||
114 | else: |
|
114 | else: | |
115 | # suboptimal deltaparent |
|
115 | # suboptimal deltaparent | |
116 | deltaparent = min(0, parentrev) |
|
116 | deltaparent = min(0, parentrev) | |
|
117 | if not rlog.candelta(deltaparent, r): | |||
|
118 | deltaparent = -1 | |||
117 | return {'node': rlog.node(r), 'p1': pnode, 'p2': node.nullid, |
|
119 | return {'node': rlog.node(r), 'p1': pnode, 'p2': node.nullid, | |
118 | 'cs': rlog.node(rlog.linkrev(r)), 'flags': rlog.flags(r), |
|
120 | 'cs': rlog.node(rlog.linkrev(r)), 'flags': rlog.flags(r), | |
119 | 'deltabase': rlog.node(deltaparent), |
|
121 | 'deltabase': rlog.node(deltaparent), | |
@@ -151,12 +153,14 b" def lowlevelcopy(rlog, tr, destname=b'_d" | |||||
151 | for r in rlog: |
|
153 | for r in rlog: | |
152 | p1 = rlog.node(r - 1) |
|
154 | p1 = rlog.node(r - 1) | |
153 | p2 = node.nullid |
|
155 | p2 = node.nullid | |
154 | if r == 0: |
|
156 | if r == 0 or (rlog.flags(r) & revlog.REVIDX_EXTSTORED): | |
155 | text = rlog.revision(r, raw=True) |
|
157 | text = rlog.revision(r, raw=True) | |
156 | cachedelta = None |
|
158 | cachedelta = None | |
157 | else: |
|
159 | else: | |
158 |
# deltaparent |
|
160 | # deltaparent cannot have EXTSTORED flag. | |
159 | deltaparent = max([0] + [p for p in range(r - 2) if rlog.flags(p)]) |
|
161 | deltaparent = max([-1] + | |
|
162 | [p for p in range(r) | |||
|
163 | if rlog.flags(p) & revlog.REVIDX_EXTSTORED == 0]) | |||
160 | text = None |
|
164 | text = None | |
161 | cachedelta = (deltaparent, rlog.revdiff(deltaparent, r)) |
|
165 | cachedelta = (deltaparent, rlog.revdiff(deltaparent, r)) | |
162 | flags = rlog.flags(r) |
|
166 | flags = rlog.flags(r) | |
@@ -262,8 +266,9 b' def writecases(rlog, tr):' | |||||
262 | result.append((text, rawtext)) |
|
266 | result.append((text, rawtext)) | |
263 |
|
267 | |||
264 | # Verify flags like isdelta, isext work as expected |
|
268 | # Verify flags like isdelta, isext work as expected | |
265 | if bool(rlog.deltaparent(rev) > -1) != isdelta: |
|
269 | # isdelta can be overridden to False if this or p1 has isext set | |
266 | abort('rev %d: isdelta is ineffective' % rev) |
|
270 | if bool(rlog.deltaparent(rev) > -1) and not isdelta: | |
|
271 | abort('rev %d: isdelta is unexpected' % rev) | |||
267 | if bool(rlog.flags(rev)) != isext: |
|
272 | if bool(rlog.flags(rev)) != isext: | |
268 | abort('rev %d: isext is ineffective' % rev) |
|
273 | abort('rev %d: isext is ineffective' % rev) | |
269 | return result |
|
274 | return result |
General Comments 0
You need to be logged in to leave comments.
Login now