[Bug 3831] New: rebase across unrelated trees leaves root with multiple parents
mercurial-bugs at selenic.com
mercurial-bugs at selenic.com
Sun Feb 17 12:39:59 CST 2013
http://bz.selenic.com/show_bug.cgi?id=3831
Priority: normal
Bug ID: 3831
CC: mercurial-devel at selenic.com
Assignee: bugzilla at selenic.com
Summary: rebase across unrelated trees leaves root with
multiple parents
Severity: bug
Classification: Unclassified
OS: Windows
Reporter: jaraco at jaraco.com
Hardware: PC
Status: UNCONFIRMED
Version: unspecified
Component: rebase
Product: Mercurial
I recently encountered a situation where a rebase leaves the rebased changeset
with the original ancestry present. Here's a simple reproduction with Mercurial
2.4.2.
PS C:\Users\jaraco> hg init x
PS C:\Users\jaraco> cd x
PS C:\Users\jaraco\x> touch a
PS C:\Users\jaraco\x> hg add a
PS C:\Users\jaraco\x> hg ci -m "1"
PS C:\Users\jaraco\x> hg update null
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
PS C:\Users\jaraco\x> touch a
PS C:\Users\jaraco\x> hg add a
PS C:\Users\jaraco\x> hg ci -m "1 (two)"
created new head
PS C:\Users\jaraco\x> thgw log
PS C:\Users\jaraco\x> cat > a
foo
PS C:\Users\jaraco\x> hg ci -m "Edit"
PS C:\Users\jaraco\x> hg log
changeset: 2:41e2fa94ff99
tag: tip
user: Jason R. Coombs <jaraco at jaraco.com>
date: Sun Feb 17 18:12:03 2013 -0500
summary: Edit
changeset: 1:f42354edd70b
parent: -1:000000000000
user: Jason R. Coombs <jaraco at jaraco.com>
date: Sun Feb 17 18:11:06 2013 -0500
summary: 1 (two)
changeset: 0:9984c651bc1b
user: Jason R. Coombs <jaraco at jaraco.com>
date: Sun Feb 17 18:10:46 2013 -0500
summary: 1
PS C:\Users\jaraco\x> hg rebase -s 2 -d 0
merging a
saved backup bundle to
C:\Users\jaraco\x\.hg\strip-backup\41e2fa94ff99-backup.hg
PS C:\Users\jaraco\x> hg log
changeset: 2:c3f0325c6930
tag: tip
parent: 0:9984c651bc1b
parent: 1:f42354edd70b
user: Jason R. Coombs <jaraco at jaraco.com>
date: Sun Feb 17 18:12:03 2013 -0500
summary: Edit
changeset: 1:f42354edd70b
parent: -1:000000000000
user: Jason R. Coombs <jaraco at jaraco.com>
date: Sun Feb 17 18:11:06 2013 -0500
summary: 1 (two)
changeset: 0:9984c651bc1b
user: Jason R. Coombs <jaraco at jaraco.com>
date: Sun Feb 17 18:10:46 2013 -0500
summary: 1
As you can see, the rebased change now appears with parents in both 0 and 1. My
expectation based on other rebases I've done is that the rebased change should
be moved, not merged. My goal in moving the tree is to strip the changeset at
rev 1, but keep change 2. Because of this behavior, it's not possible to remove
1.
Do you have any suggestions for (a) how I might be doing this wrong, (b) if
there is a workaround, or (c) confirm this is undesirable behavior (a bug) and
suggest when it might be fixed?
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Mercurial-devel
mailing list