Show More
@@ -851,7 +851,7 b' class _GeneralDeltaSearch(_BaseDeltaSear' | |||
|
851 | 851 | def next_group(self, good_delta=None): |
|
852 | 852 | old_good = self._last_good |
|
853 | 853 | if good_delta is not None: |
|
854 |
self._last_good = good_delta |
|
|
854 | self._last_good = good_delta | |
|
855 | 855 | if self.current_stage == _STAGE_CACHED and good_delta is not None: |
|
856 | 856 | # the cache is good, let us use the cache as requested |
|
857 | 857 | self._candidates_iterator = None |
@@ -1213,28 +1213,24 b' class _SparseDeltaSearch(_GeneralDeltaSe' | |||
|
1213 | 1213 | if good is not None: |
|
1214 | 1214 | break |
|
1215 | 1215 | # if we have a refinable value, try to refine it |
|
1216 | if ( | |
|
1217 | good is not None | |
|
1218 | and good not in (self.p1, self.p2) | |
|
1219 | and self.revlog.issnapshot(good) | |
|
1220 | ): | |
|
1216 | if good is not None and good.snapshotdepth is not None: | |
|
1221 | 1217 | assert self.current_stage == _STAGE_SNAPSHOT |
|
1222 | 1218 | # refine snapshot down |
|
1223 | 1219 | previous = None |
|
1224 | 1220 | while previous != good: |
|
1225 | 1221 | previous = good |
|
1226 | base = self.revlog.deltaparent(good) | |
|
1222 | base = self.revlog.deltaparent(good.base) | |
|
1227 | 1223 | if base == nullrev: |
|
1228 | 1224 | break |
|
1229 | 1225 | good = yield (base,) |
|
1230 | 1226 | # refine snapshot up |
|
1231 | 1227 | if not self.snapshot_cache.snapshots: |
|
1232 | self.snapshot_cache.update(self.revlog, good + 1) | |
|
1228 | self.snapshot_cache.update(self.revlog, good.base + 1) | |
|
1233 | 1229 | previous = None |
|
1234 | 1230 | while good != previous: |
|
1235 | 1231 | previous = good |
|
1236 | 1232 | children = tuple( |
|
1237 | sorted(c for c in self.snapshot_cache.snapshots[good]) | |
|
1233 | sorted(c for c in self.snapshot_cache.snapshots[good.base]) | |
|
1238 | 1234 | ) |
|
1239 | 1235 | good = yield children |
|
1240 | 1236 | yield None |
General Comments 0
You need to be logged in to leave comments.
Login now