comparison 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
comparison
equal deleted inserted replaced
38669:b5891bf8ab13 38670:fbec9c0b32d3
587 ''.join(_(" alternatively, use --config " 587 ''.join(_(" alternatively, use --config "
588 "merge.preferancestor=%s\n") % 588 "merge.preferancestor=%s\n") %
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 isancestorof(self, other):
593 """True if other is descendant of this changeset""" 593 """True if this changeset is an ancestor of other"""
594 return self._repo.changelog.isancestorrev(self._rev, other._rev) 594 return self._repo.changelog.isancestorrev(self._rev, other._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