diff mercurial/context.py @ 38664:160da69ba1bf

revlog: replace descendant(b, a) by isdescendantrev(a, b) (API) The "is" is to match "isancestor" and to make it clear that it doesn't return a descendant. The "rev" is to make it clear that it's not about nodeids (unlike e.g. isancestor()). The argument order change is just seems more natural (and makes isancestor() less confusing). Differential Revision: https://phab.mercurial-scm.org/D3929
author Martin von Zweigbergk <martinvonz@google.com>
date Wed, 11 Jul 2018 16:21:41 -0700
parents 760cc5dc01e8
children 21846c94e605
line wrap: on
line diff
--- a/mercurial/context.py	Wed Jul 11 16:27:40 2018 -0700
+++ b/mercurial/context.py	Wed Jul 11 16:21:41 2018 -0700
@@ -591,7 +591,7 @@
 
     def descendant(self, other):
         """True if other is descendant of this changeset"""
-        return self._repo.changelog.descendant(self._rev, other._rev)
+        return self._repo.changelog.isdescendantrev(other._rev, self._rev)
 
     def walk(self, match):
         '''Generates matching file names.'''