D3930: revlog: make isdescendantrev(a, b) check if a < b

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Thu Jul 12 00:09:53 UTC 2018


martinvonz created this revision.
Herald added a reviewer: indygreg.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This check was taken from rebase.py. It seems to make sense to move it
  here, but I haven't done any measurements.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3930

AFFECTED FILES
  mercurial/revlog.py

CHANGE DETAILS

diff --git a/mercurial/revlog.py b/mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -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):



To: martinvonz, indygreg, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list