Mercurial > hg
comparison hgext/rebase.py @ 27963:07a5de79ec30 stable
rebase: better way to detect non-detaching revisions (issue5044)
Rather than look for the lowest revision, see if the rebase state is tracking
the parents of this revision. Otherwise we can't handle multiple revisions in
one rebase that includes a merge revision.
Fixes issue5044.
author | Martijn Pieters <mj@zopatista.com> |
---|---|
date | Mon, 01 Feb 2016 15:41:43 +0000 |
parents | 4322849a5357 |
children | 6f92d6bd2972 |
comparison
equal
deleted
inserted
replaced
27960:0ec12435b78b | 27963:07a5de79ec30 |
---|---|
710 'would have 3 parents') % rev) | 710 'would have 3 parents') % rev) |
711 p2 = p2n | 711 p2 = p2n |
712 repo.ui.debug(" future parents are %d and %d\n" % | 712 repo.ui.debug(" future parents are %d and %d\n" % |
713 (repo[p1].rev(), repo[p2].rev())) | 713 (repo[p1].rev(), repo[p2].rev())) |
714 | 714 |
715 if rev == min(state): | 715 if not any(p.rev() in state for p in parents): |
716 # Case (1) initial changeset of a non-detaching rebase. | 716 # Case (1) root changeset of a non-detaching rebase set. |
717 # Let the merge mechanism find the base itself. | 717 # Let the merge mechanism find the base itself. |
718 base = None | 718 base = None |
719 elif not repo[rev].p2(): | 719 elif not repo[rev].p2(): |
720 # Case (2) detaching the node with a single parent, use this parent | 720 # Case (2) detaching the node with a single parent, use this parent |
721 base = repo[rev].p1().rev() | 721 base = repo[rev].p1().rev() |