##// END OF EJS Templates
rebase: fix some weird mixed-case naming
Matt Mackall -
r22906:75d0edb6 default
parent child Browse files
Show More
@@ -611,40 +611,40 b' def defineparents(repo, rev, target, sta'
611 parents = repo[rev].parents()
611 parents = repo[rev].parents()
612 p1 = p2 = nullrev
612 p1 = p2 = nullrev
613
613
614 P1n = parents[0].rev()
614 p1n = parents[0].rev()
615 if P1n in targetancestors:
615 if p1n in targetancestors:
616 p1 = target
616 p1 = target
617 elif P1n in state:
617 elif p1n in state:
618 if state[P1n] == nullmerge:
618 if state[p1n] == nullmerge:
619 p1 = target
619 p1 = target
620 elif state[P1n] == revignored:
620 elif state[p1n] == revignored:
621 p1 = nearestrebased(repo, P1n, state)
621 p1 = nearestrebased(repo, p1n, state)
622 if p1 is None:
622 if p1 is None:
623 p1 = target
623 p1 = target
624 else:
624 else:
625 p1 = state[P1n]
625 p1 = state[p1n]
626 else: # P1n external
626 else: # p1n external
627 p1 = target
627 p1 = target
628 p2 = P1n
628 p2 = p1n
629
629
630 if len(parents) == 2 and parents[1].rev() not in targetancestors:
630 if len(parents) == 2 and parents[1].rev() not in targetancestors:
631 P2n = parents[1].rev()
631 p2n = parents[1].rev()
632 # interesting second parent
632 # interesting second parent
633 if P2n in state:
633 if p2n in state:
634 if p1 == target: # P1n in targetancestors or external
634 if p1 == target: # p1n in targetancestors or external
635 p1 = state[P2n]
635 p1 = state[p2n]
636 elif state[P2n] == revignored:
636 elif state[p2n] == revignored:
637 p2 = nearestrebased(repo, P2n, state)
637 p2 = nearestrebased(repo, p2n, state)
638 if p2 is None:
638 if p2 is None:
639 # no ancestors rebased yet, detach
639 # no ancestors rebased yet, detach
640 p2 = target
640 p2 = target
641 else:
641 else:
642 p2 = state[P2n]
642 p2 = state[p2n]
643 else: # P2n external
643 else: # p2n external
644 if p2 != nullrev: # P1n external too => rev is a merged revision
644 if p2 != nullrev: # p1n external too => rev is a merged revision
645 raise util.Abort(_('cannot use revision %d as base, result '
645 raise util.Abort(_('cannot use revision %d as base, result '
646 'would have 3 parents') % rev)
646 'would have 3 parents') % rev)
647 p2 = P2n
647 p2 = p2n
648 repo.ui.debug(" future parents are %d and %d\n" %
648 repo.ui.debug(" future parents are %d and %d\n" %
649 (repo[p1].rev(), repo[p2].rev()))
649 (repo[p1].rev(), repo[p2].rev()))
650 return p1, p2
650 return p1, p2
General Comments 0
You need to be logged in to leave comments. Login now