Mercurial > hg
annotate tests/test-rebase-newancestor @ 9815:49efeed49c94
rebase: make sure the newancestor is used during the whole update
(issue1561)
Before this change, newancestor was used only once as a replacement
for ancestor.ancestor, but merge.update calls ancestor.ancestor
several times, so it ends up with the "wrong" ancestor (the real
ancestor, but we want the parent of the rebased changeset for all but
the first rebased changeset).
Added a new test case for this: test-rebase-newancestor.
Also, in one scenario in test-rebase-collapse, there was a spurious
conflict caused by the same issue, so that test case was fixed by
removing the now unneeded conflict resolution and the output was
adapted accordingly.
author | Christian Boos <cboos@bct-technology.com> |
---|---|
date | Mon, 09 Nov 2009 20:15:49 +0100 |
parents | |
children | b345b1cc124f |
rev | line source |
---|---|
9815
49efeed49c94
rebase: make sure the newancestor is used during the whole update
Christian Boos <cboos@bct-technology.com>
parents:
diff
changeset
|
1 #!/bin/sh |
49efeed49c94
rebase: make sure the newancestor is used during the whole update
Christian Boos <cboos@bct-technology.com>
parents:
diff
changeset
|
2 |
49efeed49c94
rebase: make sure the newancestor is used during the whole update
Christian Boos <cboos@bct-technology.com>
parents:
diff
changeset
|
3 echo "[extensions]" >> $HGRCPATH |
49efeed49c94
rebase: make sure the newancestor is used during the whole update
Christian Boos <cboos@bct-technology.com>
parents:
diff
changeset
|
4 echo "graphlog=" >> $HGRCPATH |
49efeed49c94
rebase: make sure the newancestor is used during the whole update
Christian Boos <cboos@bct-technology.com>
parents:
diff
changeset
|
5 echo "rebase=" >> $HGRCPATH |
49efeed49c94
rebase: make sure the newancestor is used during the whole update
Christian Boos <cboos@bct-technology.com>
parents:
diff
changeset
|
6 |
49efeed49c94
rebase: make sure the newancestor is used during the whole update
Christian Boos <cboos@bct-technology.com>
parents:
diff
changeset
|
7 rm -rf repo |
49efeed49c94
rebase: make sure the newancestor is used during the whole update
Christian Boos <cboos@bct-technology.com>
parents:
diff
changeset
|
8 hg init repo |
49efeed49c94
rebase: make sure the newancestor is used during the whole update
Christian Boos <cboos@bct-technology.com>
parents:
diff
changeset
|
9 cd repo |
49efeed49c94
rebase: make sure the newancestor is used during the whole update
Christian Boos <cboos@bct-technology.com>
parents:
diff
changeset
|
10 |
49efeed49c94
rebase: make sure the newancestor is used during the whole update
Christian Boos <cboos@bct-technology.com>
parents:
diff
changeset
|
11 echo A > a |
49efeed49c94
rebase: make sure the newancestor is used during the whole update
Christian Boos <cboos@bct-technology.com>
parents:
diff
changeset
|
12 echo >> a |
49efeed49c94
rebase: make sure the newancestor is used during the whole update
Christian Boos <cboos@bct-technology.com>
parents:
diff
changeset
|
13 hg commit -AmA -u test -d '0 0' |
49efeed49c94
rebase: make sure the newancestor is used during the whole update
Christian Boos <cboos@bct-technology.com>
parents:
diff
changeset
|
14 |
49efeed49c94
rebase: make sure the newancestor is used during the whole update
Christian Boos <cboos@bct-technology.com>
parents:
diff
changeset
|
15 echo B > a |
49efeed49c94
rebase: make sure the newancestor is used during the whole update
Christian Boos <cboos@bct-technology.com>
parents:
diff
changeset
|
16 echo >> a |
49efeed49c94
rebase: make sure the newancestor is used during the whole update
Christian Boos <cboos@bct-technology.com>
parents:
diff
changeset
|
17 hg commit -mB -u test -d '1 0' |
49efeed49c94
rebase: make sure the newancestor is used during the whole update
Christian Boos <cboos@bct-technology.com>
parents:
diff
changeset
|
18 |
49efeed49c94
rebase: make sure the newancestor is used during the whole update
Christian Boos <cboos@bct-technology.com>
parents:
diff
changeset
|
19 echo C > a |
49efeed49c94
rebase: make sure the newancestor is used during the whole update
Christian Boos <cboos@bct-technology.com>
parents:
diff
changeset
|
20 echo >> a |
49efeed49c94
rebase: make sure the newancestor is used during the whole update
Christian Boos <cboos@bct-technology.com>
parents:
diff
changeset
|
21 hg commit -mC -u test -d '2 0' |
49efeed49c94
rebase: make sure the newancestor is used during the whole update
Christian Boos <cboos@bct-technology.com>
parents:
diff
changeset
|
22 |
49efeed49c94
rebase: make sure the newancestor is used during the whole update
Christian Boos <cboos@bct-technology.com>
parents:
diff
changeset
|
23 hg up -C 0 |
49efeed49c94
rebase: make sure the newancestor is used during the whole update
Christian Boos <cboos@bct-technology.com>
parents:
diff
changeset
|
24 echo D >> a |
49efeed49c94
rebase: make sure the newancestor is used during the whole update
Christian Boos <cboos@bct-technology.com>
parents:
diff
changeset
|
25 hg commit -AmAD -u test -d '3 0' |
49efeed49c94
rebase: make sure the newancestor is used during the whole update
Christian Boos <cboos@bct-technology.com>
parents:
diff
changeset
|
26 |
49efeed49c94
rebase: make sure the newancestor is used during the whole update
Christian Boos <cboos@bct-technology.com>
parents:
diff
changeset
|
27 hg glog --template '{rev}:{desc} {node|short}\n' |
49efeed49c94
rebase: make sure the newancestor is used during the whole update
Christian Boos <cboos@bct-technology.com>
parents:
diff
changeset
|
28 hg rebase -q -s 1 -d 3 2>&1 | grep -v 'saving bundle' |
49efeed49c94
rebase: make sure the newancestor is used during the whole update
Christian Boos <cboos@bct-technology.com>
parents:
diff
changeset
|
29 hg glog --template '{rev}:{desc} {node|short}\n' |
49efeed49c94
rebase: make sure the newancestor is used during the whole update
Christian Boos <cboos@bct-technology.com>
parents:
diff
changeset
|
30 |
49efeed49c94
rebase: make sure the newancestor is used during the whole update
Christian Boos <cboos@bct-technology.com>
parents:
diff
changeset
|
31 exit 0 |