changeset 38665:6afa928033bd

revlog: make isdescendantrev(a, b) check if a < b This check was taken from rebase.py. It seems to make sense to move it here, but I haven't done any measurements. Differential Revision: https://phab.mercurial-scm.org/D3930
author Martin von Zweigbergk <martinvonz@google.com>
date Wed, 11 Jul 2018 16:37:30 -0700
parents 160da69ba1bf
children a06b2b032557
files mercurial/revlog.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revlog.py	Wed Jul 11 16:21:41 2018 -0700
+++ b/mercurial/revlog.py	Wed Jul 11 16:37:30 2018 -0700
@@ -1656,6 +1656,8 @@
             return True
         elif a == b:
             return True
+        elif a < b:
+            return False
         return b in self._commonancestorsheads(a, b)
 
     def commonancestorsheads(self, a, b):