annotate tests/test-rebase-newancestor.t @ 48393:1a8a70b4b0ad

dirstate: cleanup remaining of "now" during write Since the whole `need_delay` have been removed, we no longer need this. Differential Revision: https://phab.mercurial-scm.org/D11797
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 19 Nov 2021 03:03:01 +0100
parents 9989a276712f
children 2cf264e9aa75
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
1 $ cat >> $HGRCPATH <<EOF
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
2 > [extensions]
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
3 > rebase=
33786
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
4 > drawdag=$TESTDIR/drawdag.py
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
5 > [alias]
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33863
diff changeset
6 > tglog = log -G --template "{rev}: {node|short} '{desc}' {branches}\n"
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
7 > EOF
11198
b345b1cc124f rebase: use helpers.sh in tests
Matt Mackall <mpm@selenic.com>
parents: 9815
diff changeset
8
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
9 $ hg init repo
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
10 $ cd repo
9815
49efeed49c94 rebase: make sure the newancestor is used during the whole update
Christian Boos <cboos@bct-technology.com>
parents:
diff changeset
11
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
12 $ echo A > a
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
13 $ echo >> a
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
14 $ hg ci -Am A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
15 adding a
9815
49efeed49c94 rebase: make sure the newancestor is used during the whole update
Christian Boos <cboos@bct-technology.com>
parents:
diff changeset
16
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
17 $ echo B > a
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
18 $ echo >> a
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
19 $ hg ci -m B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
20
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
21 $ echo C > a
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
22 $ echo >> a
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
23 $ hg ci -m C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
24
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
25 $ hg up -q -C 0
9815
49efeed49c94 rebase: make sure the newancestor is used during the whole update
Christian Boos <cboos@bct-technology.com>
parents:
diff changeset
26
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
27 $ echo D >> a
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
28 $ hg ci -Am AD
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
29 created new head
9815
49efeed49c94 rebase: make sure the newancestor is used during the whole update
Christian Boos <cboos@bct-technology.com>
parents:
diff changeset
30
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
31 $ hg tglog
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33863
diff changeset
32 @ 3: 3878212183bd 'AD'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
33 |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33863
diff changeset
34 | o 2: 30ae917c0e4f 'C'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
35 | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33863
diff changeset
36 | o 1: 0f4f7cb4f549 'B'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
37 |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33863
diff changeset
38 o 0: 1e635d440a73 'A'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
39
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
40 $ hg rebase -s 1 -d 3
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
41 rebasing 1:0f4f7cb4f549 "B"
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
42 merging a
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
43 rebasing 2:30ae917c0e4f "C"
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
44 merging a
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35385
diff changeset
45 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/0f4f7cb4f549-82b3b163-rebase.hg
9815
49efeed49c94 rebase: make sure the newancestor is used during the whole update
Christian Boos <cboos@bct-technology.com>
parents:
diff changeset
46
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
47 $ hg tglog
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33863
diff changeset
48 o 3: 25773bc4b4b0 'C'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
49 |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33863
diff changeset
50 o 2: c09015405f75 'B'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
51 |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33863
diff changeset
52 @ 1: 3878212183bd 'AD'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
53 |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33863
diff changeset
54 o 0: 1e635d440a73 'A'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
55
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
56
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
57 $ cd ..
23406
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
58
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
59
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
60 Test rebasing of merges with ancestors of the rebase destination - a situation
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
61 that often happens when trying to recover from repeated merging with a mainline
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
62 branch.
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
63
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
64 The test case creates a dev branch that contains a couple of merges from the
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
65 default branch. When rebasing to the default branch, these merges would be
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
66 merges with ancestors on the same branch. The merges _could_ contain some
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
67 interesting conflict resolutions or additional changes in the merge commit, but
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
68 that is mixed up with the actual merge stuff and there is in general no way to
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
69 separate them.
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
70
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
71 $ hg init ancestor-merge
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
72 $ cd ancestor-merge
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
73
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
74 $ touch f-default
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
75 $ hg ci -Aqm 'default: create f-default'
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
76
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
77 $ hg branch -q dev
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
78 $ hg ci -qm 'dev: create branch'
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
79
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
80 $ echo stuff > f-dev
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
81 $ hg ci -Aqm 'dev: f-dev stuff'
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
82
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
83 $ hg up -q default
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
84 $ echo stuff > f-default
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
85 $ hg ci -m 'default: f-default stuff'
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
86
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
87 $ hg up -q dev
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
88 $ hg merge -q default
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
89 $ hg ci -m 'dev: merge default'
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
90
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
91 $ hg up -q default
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
92 $ hg rm f-default
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
93 $ hg ci -m 'default: remove f-default'
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
94
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
95 $ hg up -q dev
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
96 $ hg merge -q default
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
97 $ hg ci -m 'dev: merge default'
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
98
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
99 $ hg up -q default
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
100 $ echo stuff > f-other
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
101 $ hg ci -Aqm 'default: f-other stuff'
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
102
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
103 $ hg tglog
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33863
diff changeset
104 @ 7: e08089805d82 'default: f-other stuff'
23406
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
105 |
42621
99ebde4fec99 commit: improve the files field of changelog for merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 42565
diff changeset
106 | o 6: 010ced67e558 'dev: merge default' dev
23406
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
107 |/|
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33863
diff changeset
108 o | 5: 462860db70a1 'default: remove f-default'
23406
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
109 | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33863
diff changeset
110 | o 4: 4b019212aaf6 'dev: merge default' dev
23406
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
111 |/|
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33863
diff changeset
112 o | 3: f157ecfd2b6b 'default: f-default stuff'
23406
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
113 | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33863
diff changeset
114 | o 2: ec2c14fb2984 'dev: f-dev stuff' dev
23406
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
115 | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33863
diff changeset
116 | o 1: 1d1a643d390e 'dev: create branch' dev
23406
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
117 |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33863
diff changeset
118 o 0: e90e8eb90b6f 'default: create f-default'
23406
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
119
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
120 $ hg clone -qU . ../ancestor-merge-2
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
121
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
122 Full rebase all the way back from branching point:
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
123
27598
97e39f70fb47 tests: explicitly request changed version in test-rebase-newancestor.t
Siddharth Agarwal <sid0@fb.com>
parents: 27163
diff changeset
124 $ hg rebase -r 'only(dev,default)' -d default --config ui.interactive=True << EOF
97e39f70fb47 tests: explicitly request changed version in test-rebase-newancestor.t
Siddharth Agarwal <sid0@fb.com>
parents: 27163
diff changeset
125 > c
97e39f70fb47 tests: explicitly request changed version in test-rebase-newancestor.t
Siddharth Agarwal <sid0@fb.com>
parents: 27163
diff changeset
126 > EOF
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
127 rebasing 1:1d1a643d390e "dev: create branch"
40865
4edd427f34c1 rebase: clarify that commits that become empty are skipped
Martin von Zweigbergk <martinvonz@google.com>
parents: 40864
diff changeset
128 note: not rebasing 1:1d1a643d390e "dev: create branch", its destination already has all its changes
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
129 rebasing 2:ec2c14fb2984 "dev: f-dev stuff"
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
130 rebasing 4:4b019212aaf6 "dev: merge default"
44341
77bb38be00ea rebase: always be graft-like, not merge-like, also for merges
Martin von Zweigbergk <martinvonz@google.com>
parents: 42621
diff changeset
131 note: not rebasing 4:4b019212aaf6 "dev: merge default", its destination already has all its changes
42621
99ebde4fec99 commit: improve the files field of changelog for merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 42565
diff changeset
132 rebasing 6:010ced67e558 "dev: merge default"
44341
77bb38be00ea rebase: always be graft-like, not merge-like, also for merges
Martin von Zweigbergk <martinvonz@google.com>
parents: 42621
diff changeset
133 note: not rebasing 6:010ced67e558 "dev: merge default", its destination already has all its changes
42621
99ebde4fec99 commit: improve the files field of changelog for merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 42565
diff changeset
134 saved backup bundle to $TESTTMP/ancestor-merge/.hg/strip-backup/1d1a643d390e-4a6f6d17-rebase.hg
23406
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
135 $ hg tglog
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33863
diff changeset
136 o 4: 3e075b1c0a40 'dev: f-dev stuff'
23406
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
137 |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33863
diff changeset
138 @ 3: e08089805d82 'default: f-other stuff'
23406
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
139 |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33863
diff changeset
140 o 2: 462860db70a1 'default: remove f-default'
23406
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
141 |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33863
diff changeset
142 o 1: f157ecfd2b6b 'default: f-default stuff'
23406
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
143 |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33863
diff changeset
144 o 0: e90e8eb90b6f 'default: create f-default'
23406
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
145
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
146 Grafty cherry picking rebasing:
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
147
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
148 $ cd ../ancestor-merge-2
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
149
65f215ea3e8e tests: add test for rebasing merges with ancestors of the rebase destination
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
150 $ hg phase -fdr0:
27598
97e39f70fb47 tests: explicitly request changed version in test-rebase-newancestor.t
Siddharth Agarwal <sid0@fb.com>
parents: 27163
diff changeset
151 $ hg rebase -r 'children(only(dev,default))' -d default --config ui.interactive=True << EOF
97e39f70fb47 tests: explicitly request changed version in test-rebase-newancestor.t
Siddharth Agarwal <sid0@fb.com>
parents: 27163
diff changeset
152 > c
97e39f70fb47 tests: explicitly request changed version in test-rebase-newancestor.t
Siddharth Agarwal <sid0@fb.com>
parents: 27163
diff changeset
153 > EOF
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
154 rebasing 2:ec2c14fb2984 "dev: f-dev stuff"
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
155 rebasing 4:4b019212aaf6 "dev: merge default"
44341
77bb38be00ea rebase: always be graft-like, not merge-like, also for merges
Martin von Zweigbergk <martinvonz@google.com>
parents: 42621
diff changeset
156 abort: rebasing 4:4b019212aaf6 will include unwanted changes from 1:1d1a643d390e
46632
9989a276712f errors: use more specific errors in rebase extension
Martin von Zweigbergk <martinvonz@google.com>
parents: 45771
diff changeset
157 [10]
23407
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
158 $ cd ..
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
159
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
160
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
161 Test order of parents of rebased merged with un-rebased changes as p1.
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
162
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
163 $ hg init parentorder
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
164 $ cd parentorder
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
165 $ touch f
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
166 $ hg ci -Aqm common
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
167 $ touch change
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
168 $ hg ci -Aqm change
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
169 $ touch target
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
170 $ hg ci -Aqm target
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
171 $ hg up -qr 0
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
172 $ touch outside
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
173 $ hg ci -Aqm outside
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
174 $ hg merge -qr 1
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
175 $ hg ci -m 'merge p1 3=outside p2 1=ancestor'
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
176 $ hg par
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
177 changeset: 4:6990226659be
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
178 tag: tip
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
179 parent: 3:f59da8fc0fcf
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
180 parent: 1:dd40c13f7a6f
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
181 user: test
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
182 date: Thu Jan 01 00:00:00 1970 +0000
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
183 summary: merge p1 3=outside p2 1=ancestor
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
184
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
185 $ hg up -qr 1
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
186 $ hg merge -qr 3
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
187 $ hg ci -qm 'merge p1 1=ancestor p2 3=outside'
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
188 $ hg par
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
189 changeset: 5:a57575f79074
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
190 tag: tip
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
191 parent: 1:dd40c13f7a6f
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
192 parent: 3:f59da8fc0fcf
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
193 user: test
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
194 date: Thu Jan 01 00:00:00 1970 +0000
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
195 summary: merge p1 1=ancestor p2 3=outside
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
196
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
197 $ hg tglog
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33863
diff changeset
198 @ 5: a57575f79074 'merge p1 1=ancestor p2 3=outside'
23407
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
199 |\
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33863
diff changeset
200 +---o 4: 6990226659be 'merge p1 3=outside p2 1=ancestor'
23407
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
201 | |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33863
diff changeset
202 | o 3: f59da8fc0fcf 'outside'
23407
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
203 | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33863
diff changeset
204 +---o 2: a60552eb93fb 'target'
23407
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
205 | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33863
diff changeset
206 o | 1: dd40c13f7a6f 'change'
23407
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
207 |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33863
diff changeset
208 o 0: 02f0f58d5300 'common'
23407
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
209
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
210 $ hg rebase -r 4 -d 2
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
211 rebasing 4:6990226659be "merge p1 3=outside p2 1=ancestor"
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35385
diff changeset
212 saved backup bundle to $TESTTMP/parentorder/.hg/strip-backup/6990226659be-4d67a0d3-rebase.hg
23407
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
213 $ hg tip
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
214 changeset: 5:cca50676b1c5
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
215 tag: tip
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
216 parent: 2:a60552eb93fb
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
217 parent: 3:f59da8fc0fcf
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
218 user: test
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
219 date: Thu Jan 01 00:00:00 1970 +0000
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
220 summary: merge p1 3=outside p2 1=ancestor
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
221
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
222 $ hg rebase -r 4 -d 2
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
223 rebasing 4:a57575f79074 "merge p1 1=ancestor p2 3=outside"
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35385
diff changeset
224 saved backup bundle to $TESTTMP/parentorder/.hg/strip-backup/a57575f79074-385426e5-rebase.hg
23407
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
225 $ hg tip
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
226 changeset: 5:f9daf77ffe76
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
227 tag: tip
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
228 parent: 2:a60552eb93fb
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
229 parent: 3:f59da8fc0fcf
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
230 user: test
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
231 date: Thu Jan 01 00:00:00 1970 +0000
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
232 summary: merge p1 1=ancestor p2 3=outside
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
233
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
234 $ hg tglog
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33863
diff changeset
235 @ 5: f9daf77ffe76 'merge p1 1=ancestor p2 3=outside'
23407
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
236 |\
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33863
diff changeset
237 +---o 4: cca50676b1c5 'merge p1 3=outside p2 1=ancestor'
23407
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
238 | |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33863
diff changeset
239 | o 3: f59da8fc0fcf 'outside'
23407
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
240 | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33863
diff changeset
241 o | 2: a60552eb93fb 'target'
23407
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
242 | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33863
diff changeset
243 o | 1: dd40c13f7a6f 'change'
23407
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
244 |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33863
diff changeset
245 o 0: 02f0f58d5300 'common'
23407
06b6867d853f tests: test coverage of parent order with p1 outside rebase set
Mads Kiilerich <madski@unity3d.com>
parents: 23406
diff changeset
246
23408
36dcd3db70ab tests: test rebase of merge of target ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 23407
diff changeset
247 rebase of merge of ancestors
36dcd3db70ab tests: test rebase of merge of target ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 23407
diff changeset
248
36dcd3db70ab tests: test rebase of merge of target ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 23407
diff changeset
249 $ hg up -qr 2
36dcd3db70ab tests: test rebase of merge of target ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 23407
diff changeset
250 $ hg merge -qr 3
36dcd3db70ab tests: test rebase of merge of target ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 23407
diff changeset
251 $ echo 'other change while merging future "rebase ancestors"' > other
36dcd3db70ab tests: test rebase of merge of target ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 23407
diff changeset
252 $ hg ci -Aqm 'merge rebase ancestors'
36dcd3db70ab tests: test rebase of merge of target ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 23407
diff changeset
253 $ hg rebase -d 5 -v
45771
f90a5c211251 rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents: 44341
diff changeset
254 rebasing 6:4c5f12f25ebe tip "merge rebase ancestors"
23408
36dcd3db70ab tests: test rebase of merge of target ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 23407
diff changeset
255 resolving manifests
36dcd3db70ab tests: test rebase of merge of target ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 23407
diff changeset
256 removing other
36dcd3db70ab tests: test rebase of merge of target ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 23407
diff changeset
257 resolving manifests
36dcd3db70ab tests: test rebase of merge of target ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 23407
diff changeset
258 getting other
23749
a387b0390082 localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents: 23748
diff changeset
259 committing files:
23408
36dcd3db70ab tests: test rebase of merge of target ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 23407
diff changeset
260 other
23749
a387b0390082 localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents: 23748
diff changeset
261 committing manifest
a387b0390082 localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents: 23748
diff changeset
262 committing changelog
23408
36dcd3db70ab tests: test rebase of merge of target ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 23407
diff changeset
263 rebase merging completed
36dcd3db70ab tests: test rebase of merge of target ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 23407
diff changeset
264 1 changesets found
23748
4ab66de46a96 bundle: when verbose, show what takes up the space in the generated bundle
Mads Kiilerich <madski@unity3d.com>
parents: 23518
diff changeset
265 uncompressed size of bundle content:
30211
6b0741d6d234 changegroup: skip delta when the underlying revlog do not use them
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 29775
diff changeset
266 199 (changelog)
26928
42b5193ab5de test: use generaldelta in 'test-rebase-newancestors.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23835
diff changeset
267 216 (manifests)
42b5193ab5de test: use generaldelta in 'test-rebase-newancestors.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23835
diff changeset
268 182 other
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35385
diff changeset
269 saved backup bundle to $TESTTMP/parentorder/.hg/strip-backup/4c5f12f25ebe-f46990e5-rebase.hg
23408
36dcd3db70ab tests: test rebase of merge of target ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 23407
diff changeset
270 1 changesets found
23748
4ab66de46a96 bundle: when verbose, show what takes up the space in the generated bundle
Mads Kiilerich <madski@unity3d.com>
parents: 23518
diff changeset
271 uncompressed size of bundle content:
30211
6b0741d6d234 changegroup: skip delta when the underlying revlog do not use them
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 29775
diff changeset
272 254 (changelog)
26928
42b5193ab5de test: use generaldelta in 'test-rebase-newancestors.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23835
diff changeset
273 167 (manifests)
42b5193ab5de test: use generaldelta in 'test-rebase-newancestors.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23835
diff changeset
274 182 other
23408
36dcd3db70ab tests: test rebase of merge of target ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 23407
diff changeset
275 adding branch
36dcd3db70ab tests: test rebase of merge of target ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 23407
diff changeset
276 adding changesets
36dcd3db70ab tests: test rebase of merge of target ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 23407
diff changeset
277 adding manifests
36dcd3db70ab tests: test rebase of merge of target ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 23407
diff changeset
278 adding file changes
36dcd3db70ab tests: test rebase of merge of target ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 23407
diff changeset
279 added 1 changesets with 1 changes to 1 files
36dcd3db70ab tests: test rebase of merge of target ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 23407
diff changeset
280 rebase completed
36dcd3db70ab tests: test rebase of merge of target ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 23407
diff changeset
281 $ hg tglog
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33863
diff changeset
282 @ 6: 113755df812b 'merge rebase ancestors'
23408
36dcd3db70ab tests: test rebase of merge of target ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 23407
diff changeset
283 |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33863
diff changeset
284 o 5: f9daf77ffe76 'merge p1 1=ancestor p2 3=outside'
23408
36dcd3db70ab tests: test rebase of merge of target ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 23407
diff changeset
285 |\
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33863
diff changeset
286 +---o 4: cca50676b1c5 'merge p1 3=outside p2 1=ancestor'
23408
36dcd3db70ab tests: test rebase of merge of target ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 23407
diff changeset
287 | |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33863
diff changeset
288 | o 3: f59da8fc0fcf 'outside'
23408
36dcd3db70ab tests: test rebase of merge of target ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 23407
diff changeset
289 | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33863
diff changeset
290 o | 2: a60552eb93fb 'target'
23408
36dcd3db70ab tests: test rebase of merge of target ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 23407
diff changeset
291 | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33863
diff changeset
292 o | 1: dd40c13f7a6f 'change'
23408
36dcd3db70ab tests: test rebase of merge of target ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 23407
diff changeset
293 |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33863
diff changeset
294 o 0: 02f0f58d5300 'common'
23408
36dcd3db70ab tests: test rebase of merge of target ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 23407
diff changeset
295
33786
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
296 Due to the limitation of 3-way merge algorithm (1 merge base), rebasing a merge
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
297 may include unwanted content:
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
298
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
299 $ hg init $TESTTMP/dual-merge-base1
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
300 $ cd $TESTTMP/dual-merge-base1
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
301 $ hg debugdrawdag <<'EOS'
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
302 > F
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
303 > /|
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
304 > D E
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
305 > | |
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
306 > B C
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
307 > |/
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
308 > A Z
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
309 > |/
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
310 > R
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
311 > EOS
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
312 $ hg rebase -r D+E+F -d Z
45771
f90a5c211251 rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents: 44341
diff changeset
313 rebasing 5:5f2c926dfecf D "D"
f90a5c211251 rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents: 44341
diff changeset
314 rebasing 6:b296604d9846 E "E"
f90a5c211251 rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents: 44341
diff changeset
315 rebasing 7:caa9781e507d F tip "F"
33863
3160876c6e4e rebase: choose merge base without unwanted revisions
Jun Wu <quark@fb.com>
parents: 33786
diff changeset
316 abort: rebasing 7:caa9781e507d will include unwanted changes from 4:d6003a550c2c or 3:c1e6b162678d
46632
9989a276712f errors: use more specific errors in rebase extension
Martin von Zweigbergk <martinvonz@google.com>
parents: 45771
diff changeset
317 [10]
33786
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
318
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
319 The warning does not get printed if there is no unwanted change detected:
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
320
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
321 $ hg init $TESTTMP/dual-merge-base2
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
322 $ cd $TESTTMP/dual-merge-base2
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
323 $ hg debugdrawdag <<'EOS'
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
324 > D
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
325 > /|
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
326 > B C
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
327 > |/
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
328 > A Z
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
329 > |/
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
330 > R
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
331 > EOS
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
332 $ hg rebase -r B+C+D -d Z
45771
f90a5c211251 rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents: 44341
diff changeset
333 rebasing 3:c1e6b162678d B "B"
f90a5c211251 rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents: 44341
diff changeset
334 rebasing 4:d6003a550c2c C "C"
f90a5c211251 rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents: 44341
diff changeset
335 rebasing 5:c8f78076273e D tip "D"
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35385
diff changeset
336 saved backup bundle to $TESTTMP/dual-merge-base2/.hg/strip-backup/d6003a550c2c-6f1424b6-rebase.hg
33786
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
337 $ hg manifest -r 'desc(D)'
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
338 B
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
339 C
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
340 R
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
341 Z
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
342
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
343 The merge base could be different from old p1 (changed parent becomes new p1):
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
344
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
345 $ hg init $TESTTMP/chosen-merge-base1
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
346 $ cd $TESTTMP/chosen-merge-base1
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
347 $ hg debugdrawdag <<'EOS'
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
348 > F
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
349 > /|
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
350 > D E
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
351 > | |
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
352 > B C Z
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
353 > EOS
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
354 $ hg rebase -r D+F -d Z
45771
f90a5c211251 rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents: 44341
diff changeset
355 rebasing 3:004dc1679908 D "D"
f90a5c211251 rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents: 44341
diff changeset
356 rebasing 5:4be4cbf6f206 F tip "F"
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35385
diff changeset
357 saved backup bundle to $TESTTMP/chosen-merge-base1/.hg/strip-backup/004dc1679908-06a66a3c-rebase.hg
33786
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
358 $ hg manifest -r 'desc(F)'
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
359 C
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
360 D
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
361 E
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
362 Z
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
363 $ hg log -r `hg log -r 'desc(F)' -T '{p1node}'` -T '{desc}\n'
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
364 D
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
365
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
366 $ hg init $TESTTMP/chosen-merge-base2
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
367 $ cd $TESTTMP/chosen-merge-base2
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
368 $ hg debugdrawdag <<'EOS'
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
369 > F
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
370 > /|
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
371 > D E
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
372 > | |
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
373 > B C Z
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
374 > EOS
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
375 $ hg rebase -r E+F -d Z
45771
f90a5c211251 rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents: 44341
diff changeset
376 rebasing 4:974e4943c210 E "E"
f90a5c211251 rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents: 44341
diff changeset
377 rebasing 5:4be4cbf6f206 F tip "F"
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35385
diff changeset
378 saved backup bundle to $TESTTMP/chosen-merge-base2/.hg/strip-backup/974e4943c210-b2874da5-rebase.hg
33786
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
379 $ hg manifest -r 'desc(F)'
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
380 B
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
381 D
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
382 E
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
383 Z
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
384 $ hg log -r `hg log -r 'desc(F)' -T '{p1node}'` -T '{desc}\n'
0975506120fb rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
385 E