mercurial/revlog.py
changeset 27251 d9bfe6289acf
parent 27250 bff71fe05768
child 27361 29f50344fa83
--- a/mercurial/revlog.py	Fri Dec 04 17:14:14 2015 -0800
+++ b/mercurial/revlog.py	Fri Dec 04 17:46:56 2015 -0800
@@ -1432,9 +1432,9 @@
                 if self._isgooddelta(candidatedelta, textlen):
                     delta = candidatedelta
             if delta is None and self._generaldelta:
-                parents = [p1r, p2r]
                 # exclude already lazy tested base if any
-                parents = [p for p in parents if p not in tested]
+                parents = [p for p in (p1r, p2r)
+                           if p != nullrev and p not in tested]
                 if parents and not self._aggressivemergedeltas:
                     # Pick whichever parent is closer to us (to minimize the
                     # chance of having to build a fulltext).