--- 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