equal
deleted
inserted
replaced
400 """ |
400 """ |
401 # deal with workingctxs |
401 # deal with workingctxs |
402 n2 = c2._node |
402 n2 = c2._node |
403 if n2 is None: |
403 if n2 is None: |
404 n2 = c2._parents[0]._node |
404 n2 = c2._parents[0]._node |
405 n = self._repo.changelog.ancestor(self._node, n2) |
405 cahs = self._repo.changelog.commonancestorsheads(self._node, n2) |
406 return changectx(self._repo, n) |
406 if not cahs: |
|
407 anc = nullid |
|
408 elif len(cahs) == 1: |
|
409 anc = cahs[0] |
|
410 else: |
|
411 anc = self._repo.changelog.ancestor(self._node, n2) |
|
412 self._repo.ui.status( |
|
413 (_("note: using %s as ancestor of %s and %s\n") % |
|
414 (short(anc), short(self._node), short(n2)))) |
|
415 return changectx(self._repo, anc) |
407 |
416 |
408 def descendant(self, other): |
417 def descendant(self, other): |
409 """True if other is descendant of this changeset""" |
418 """True if other is descendant of this changeset""" |
410 return self._repo.changelog.descendant(self._rev, other._rev) |
419 return self._repo.changelog.descendant(self._rev, other._rev) |
411 |
420 |