Mercurial > public > mercurial-scm > hg
comparison mercurial/revlogutils/deltas.py @ 39332:6f4b8f607a31
revlogdeltas: move special cases around raw revisions in finddeltainfo
The method already contains logic for no-diff cases. Having everything in the
same place is more consistent and unlocks other code improvements.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Thu, 16 Aug 2018 04:20:34 +0200 |
parents | fd0150a3c2fe |
children | 5d343a24bff5 |
comparison
equal
deleted
inserted
replaced
39331:fd0150a3c2fe | 39332:6f4b8f607a31 |
---|---|
700 Returns the first acceptable candidate revision, as ordered by | 700 Returns the first acceptable candidate revision, as ordered by |
701 _getcandidaterevs | 701 _getcandidaterevs |
702 """ | 702 """ |
703 if not revinfo.textlen: | 703 if not revinfo.textlen: |
704 return None # empty file do not need delta | 704 return None # empty file do not need delta |
705 | |
706 # no delta for flag processor revision (see "candelta" for why) | |
707 # not calling candelta since only one revision needs test, also to | |
708 # avoid overhead fetching flags again. | |
709 if revinfo.flags & REVIDX_RAWTEXT_CHANGING_FLAGS: | |
710 return None | |
705 | 711 |
706 cachedelta = revinfo.cachedelta | 712 cachedelta = revinfo.cachedelta |
707 p1 = revinfo.p1 | 713 p1 = revinfo.p1 |
708 p2 = revinfo.p2 | 714 p2 = revinfo.p2 |
709 revlog = self.revlog | 715 revlog = self.revlog |