comparison mercurial/context.py @ 22671:5220c12c43fd

changectx: skip all invalid merge.preferancestor values A better fix for 17011b36aac7 that will ignore other kinds of "invalid" revisions.
author Mads Kiilerich <madski@unity3d.com>
date Wed, 01 Oct 2014 03:40:51 +0200
parents 6f63c47cbb86
children 509e2cbee679
comparison
equal deleted inserted replaced
22670:44dce874de97 22671:5220c12c43fd
556 anc = nullid 556 anc = nullid
557 elif len(cahs) == 1: 557 elif len(cahs) == 1:
558 anc = cahs[0] 558 anc = cahs[0]
559 else: 559 else:
560 for r in self._repo.ui.configlist('merge', 'preferancestor'): 560 for r in self._repo.ui.configlist('merge', 'preferancestor'):
561 if r == '*': 561 try:
562 ctx = changectx(self._repo, r)
563 except error.RepoLookupError:
562 continue 564 continue
563 ctx = changectx(self._repo, r)
564 anc = ctx.node() 565 anc = ctx.node()
565 if anc in cahs: 566 if anc in cahs:
566 break 567 break
567 else: 568 else:
568 anc = self._repo.changelog.ancestor(self._node, n2) 569 anc = self._repo.changelog.ancestor(self._node, n2)