D3928: revlog: move comment about commonancestorsheads where it's used

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


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

REPOSITORY
  rHG Mercurial

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

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
@@ -1648,7 +1648,10 @@
     def descendant(self, start, end):
         """True if revision 'end' is an descendant of revision 'start'
 
-        A revision is considered as a descendant of itself."""
+        A revision is considered as a descendant of itself.
+
+        The implementation of this is trivial but the use of
+        commonancestorsheads is not."""
         if start == nullrev:
             return True
         elif start == end:
@@ -1670,10 +1673,7 @@
         return ancs
 
     def isancestor(self, a, b):
-        """return True if node a is an ancestor of node b
-
-        The implementation of this is trivial but the use of
-        commonancestorsheads is not."""
+        """return True if node a is an ancestor of node b"""
         a, b = self.rev(a), self.rev(b)
         return self.descendant(a, b)
 



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


More information about the Mercurial-devel mailing list