##// END OF EJS Templates
revlog: skip over empty revision when looking for delta base...
Boris Feld -
r39118:8f83a953 default
parent child Browse files
Show More
@@ -743,10 +743,20 b' class _deltacomputer(object):'
743 p2 = revinfo.p2
743 p2 = revinfo.p2
744 revlog = self.revlog
744 revlog = self.revlog
745
745
746 deltalength = self.revlog.length
747 deltaparent = self.revlog.deltaparent
748
746 deltainfo = None
749 deltainfo = None
747 for candidaterevs in self._getcandidaterevs(p1, p2, cachedelta):
750 for candidaterevs in self._getcandidaterevs(p1, p2, cachedelta):
748 nominateddeltas = []
751 nominateddeltas = []
749 for candidaterev in candidaterevs:
752 for candidaterev in candidaterevs:
753 # skip over empty delta (no need to include them in a chain)
754 while candidaterev != nullrev and not deltalength(candidaterev):
755 candidaterev = deltaparent(candidaterev)
756 # no need to try a delta against nullid, this will be handled
757 # by fulltext later.
758 if candidaterev == nullrev:
759 continue
750 # no delta for rawtext-changing revs (see "candelta" for why)
760 # no delta for rawtext-changing revs (see "candelta" for why)
751 if revlog.flags(candidaterev) & REVIDX_RAWTEXT_CHANGING_FLAGS:
761 if revlog.flags(candidaterev) & REVIDX_RAWTEXT_CHANGING_FLAGS:
752 continue
762 continue
@@ -267,7 +267,7 b' test maxdeltachainspan'
267 51 4 3 50 prev 356 594 611 1.02862 611 0 0.00000
267 51 4 3 50 prev 356 594 611 1.02862 611 0 0.00000
268 52 4 4 51 p1 58 640 669 1.04531 669 0 0.00000
268 52 4 4 51 p1 58 640 669 1.04531 669 0 0.00000
269 53 5 1 -1 base 0 0 0 0.00000 0 0 0.00000
269 53 5 1 -1 base 0 0 0 0.00000 0 0 0.00000
270 54 5 2 53 p1 376 640 376 0.58750 376 0 0.00000
270 54 6 1 -1 base 369 640 369 0.57656 369 0 0.00000
271 $ hg clone --pull source-repo --config experimental.maxdeltachainspan=2800 relax-chain --config format.generaldelta=yes
271 $ hg clone --pull source-repo --config experimental.maxdeltachainspan=2800 relax-chain --config format.generaldelta=yes
272 requesting all changes
272 requesting all changes
273 adding changesets
273 adding changesets
@@ -333,7 +333,7 b' test maxdeltachainspan'
333 51 2 13 17 p1 58 594 739 1.24411 2781 2042 2.76319
333 51 2 13 17 p1 58 594 739 1.24411 2781 2042 2.76319
334 52 5 1 -1 base 369 640 369 0.57656 369 0 0.00000
334 52 5 1 -1 base 369 640 369 0.57656 369 0 0.00000
335 53 6 1 -1 base 0 0 0 0.00000 0 0 0.00000
335 53 6 1 -1 base 0 0 0 0.00000 0 0 0.00000
336 54 6 2 53 p1 376 640 376 0.58750 376 0 0.00000
336 54 7 1 -1 base 369 640 369 0.57656 369 0 0.00000
337 $ hg clone --pull source-repo --config experimental.maxdeltachainspan=0 noconst-chain --config format.generaldelta=yes
337 $ hg clone --pull source-repo --config experimental.maxdeltachainspan=0 noconst-chain --config format.generaldelta=yes
338 requesting all changes
338 requesting all changes
339 adding changesets
339 adding changesets
@@ -399,4 +399,4 b' test maxdeltachainspan'
399 51 2 13 17 p1 58 594 739 1.24411 2642 1903 2.57510
399 51 2 13 17 p1 58 594 739 1.24411 2642 1903 2.57510
400 52 2 14 51 p1 58 640 797 1.24531 2700 1903 2.38770
400 52 2 14 51 p1 58 640 797 1.24531 2700 1903 2.38770
401 53 4 1 -1 base 0 0 0 0.00000 0 0 0.00000
401 53 4 1 -1 base 0 0 0 0.00000 0 0 0.00000
402 54 4 2 53 p1 376 640 376 0.58750 376 0 0.00000
402 54 5 1 -1 base 369 640 369 0.57656 369 0 0.00000
General Comments 0
You need to be logged in to leave comments. Login now