Mercurial > hg-stable
diff mercurial/revlogutils/deltas.py @ 39359: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 |
line wrap: on
line diff
--- a/mercurial/revlogutils/deltas.py Wed Aug 29 09:41:04 2018 -0700 +++ b/mercurial/revlogutils/deltas.py Thu Aug 16 04:20:34 2018 +0200 @@ -703,6 +703,12 @@ if not revinfo.textlen: return None # empty file do not need delta + # no delta for flag processor revision (see "candelta" for why) + # not calling candelta since only one revision needs test, also to + # avoid overhead fetching flags again. + if revinfo.flags & REVIDX_RAWTEXT_CHANGING_FLAGS: + return None + cachedelta = revinfo.cachedelta p1 = revinfo.p1 p2 = revinfo.p2