comparison 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
comparison
equal deleted inserted replaced
38663:93d9690ff2b0 38664:160da69ba1bf
589 short(n) for n in sorted(cahs) if n != anc)) 589 short(n) for n in sorted(cahs) if n != anc))
590 return changectx(self._repo, anc) 590 return changectx(self._repo, anc)
591 591
592 def descendant(self, other): 592 def descendant(self, other):
593 """True if other is descendant of this changeset""" 593 """True if other is descendant of this changeset"""
594 return self._repo.changelog.descendant(self._rev, other._rev) 594 return self._repo.changelog.isdescendantrev(other._rev, self._rev)
595 595
596 def walk(self, match): 596 def walk(self, match):
597 '''Generates matching file names.''' 597 '''Generates matching file names.'''
598 598
599 # Wrap match.bad method to have message with nodeid 599 # Wrap match.bad method to have message with nodeid