Mercurial > public > mercurial-scm > hg-stable
diff mercurial/context.py @ 38670:fbec9c0b32d3
context: rename descendant() to isancestorof()
This makes the direction much clearer, IMO.
Differential Revision: https://phab.mercurial-scm.org/D3936
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 12 Jul 2018 08:22:28 -0700 |
parents | 21846c94e605 |
children | 6a032a8f741b |
line wrap: on
line diff
--- a/mercurial/context.py Thu Jul 12 09:25:02 2018 -0700 +++ b/mercurial/context.py Thu Jul 12 08:22:28 2018 -0700 @@ -589,8 +589,8 @@ short(n) for n in sorted(cahs) if n != anc)) return changectx(self._repo, anc) - def descendant(self, other): - """True if other is descendant of this changeset""" + def isancestorof(self, other): + """True if this changeset is an ancestor of other""" return self._repo.changelog.isancestorrev(self._rev, other._rev) def walk(self, match):