Show More
@@ -577,6 +577,7 b' def _candidategroups(revlog, textlen, p1' | |||
|
577 | 577 | """ |
|
578 | 578 | # should we try to build a delta? |
|
579 | 579 | if not (len(revlog) and revlog._storedeltachains): |
|
580 | yield None | |
|
580 | 581 | return |
|
581 | 582 | |
|
582 | 583 | deltalength = revlog.length |
@@ -612,6 +613,7 b' def _candidategroups(revlog, textlen, p1' | |||
|
612 | 613 | # impacting performances. Some bounding or slicing mecanism |
|
613 | 614 | # would help to reduce this impact. |
|
614 | 615 | yield tuple(group) |
|
616 | yield None | |
|
615 | 617 | |
|
616 | 618 | def _findsnapshots(revlog, cache, start_rev): |
|
617 | 619 | """find snapshot from start_rev to tip""" |
@@ -842,7 +844,8 b' class deltacomputer(object):' | |||
|
842 | 844 | p1r, p2r = revlog.rev(p1), revlog.rev(p2) |
|
843 | 845 | groups = _candidategroups(self.revlog, revinfo.textlen, |
|
844 | 846 | p1r, p2r, cachedelta) |
|
845 |
|
|
|
847 | candidaterevs = next(groups) | |
|
848 | while candidaterevs is not None: | |
|
846 | 849 | nominateddeltas = [] |
|
847 | 850 | for candidaterev in candidaterevs: |
|
848 | 851 | candidatedelta = self._builddeltainfo(revinfo, candidaterev, fh) |
@@ -851,6 +854,7 b' class deltacomputer(object):' | |||
|
851 | 854 | if nominateddeltas: |
|
852 | 855 | deltainfo = min(nominateddeltas, key=lambda x: x.deltalen) |
|
853 | 856 | break |
|
857 | candidaterevs = next(groups) | |
|
854 | 858 | |
|
855 | 859 | if deltainfo is None: |
|
856 | 860 | deltainfo = self._fullsnapshotinfo(fh, revinfo) |
General Comments 0
You need to be logged in to leave comments.
Login now