Show More
@@ -1,776 +1,776 b'' | |||||
1 | $ cat >> $HGRCPATH <<EOF |
|
1 | $ cat >> $HGRCPATH <<EOF | |
2 | > [extensions] |
|
2 | > [extensions] | |
3 | > rebase= |
|
3 | > rebase= | |
4 | > mq= |
|
4 | > mq= | |
5 | > drawdag=$TESTDIR/drawdag.py |
|
5 | > drawdag=$TESTDIR/drawdag.py | |
6 | > |
|
6 | > | |
7 | > [phases] |
|
7 | > [phases] | |
8 | > publish=False |
|
8 | > publish=False | |
9 | > |
|
9 | > | |
10 | > [alias] |
|
10 | > [alias] | |
11 | > tglog = log -G --template "{rev}: {node|short} '{desc}' {branches}\n" |
|
11 | > tglog = log -G --template "{rev}: {node|short} '{desc}' {branches}\n" | |
12 | > tglogp = log -G --template "{rev}: {node|short} {phase} '{desc}' {branches}\n" |
|
12 | > tglogp = log -G --template "{rev}: {node|short} {phase} '{desc}' {branches}\n" | |
13 | > EOF |
|
13 | > EOF | |
14 |
|
14 | |||
15 | Highest phase of source commits is used: |
|
15 | Highest phase of source commits is used: | |
16 |
|
16 | |||
17 | $ hg init phase |
|
17 | $ hg init phase | |
18 | $ cd phase |
|
18 | $ cd phase | |
19 | $ hg debugdrawdag << 'EOF' |
|
19 | $ hg debugdrawdag << 'EOF' | |
20 | > D |
|
20 | > D | |
21 | > | |
|
21 | > | | |
22 | > F C |
|
22 | > F C | |
23 | > | | |
|
23 | > | | | |
24 | > E B |
|
24 | > E B | |
25 | > |/ |
|
25 | > |/ | |
26 | > A |
|
26 | > A | |
27 | > EOF |
|
27 | > EOF | |
28 |
|
28 | |||
29 | $ hg phase --force --secret D |
|
29 | $ hg phase --force --secret D | |
30 |
|
30 | |||
31 | $ cat > $TESTTMP/editor.sh <<EOF |
|
31 | $ cat > $TESTTMP/editor.sh <<EOF | |
32 | > echo "==== before editing" |
|
32 | > echo "==== before editing" | |
33 | > cat \$1 |
|
33 | > cat \$1 | |
34 | > echo "====" |
|
34 | > echo "====" | |
35 | > echo "edited manually" >> \$1 |
|
35 | > echo "edited manually" >> \$1 | |
36 | > EOF |
|
36 | > EOF | |
37 | $ HGEDITOR="sh $TESTTMP/editor.sh" hg rebase --collapse --keepbranches -e --source B --dest F |
|
37 | $ HGEDITOR="sh $TESTTMP/editor.sh" hg rebase --collapse --keepbranches -e --source B --dest F | |
38 | rebasing 1:112478962961 "B" (B) |
|
38 | rebasing 1:112478962961 "B" (B) | |
39 | rebasing 3:26805aba1e60 "C" (C) |
|
39 | rebasing 3:26805aba1e60 "C" (C) | |
40 | rebasing 5:f585351a92f8 "D" (D tip) |
|
40 | rebasing 5:f585351a92f8 "D" (D tip) | |
41 | ==== before editing |
|
41 | ==== before editing | |
42 | Collapsed revision |
|
42 | Collapsed revision | |
43 | * B |
|
43 | * B | |
44 | * C |
|
44 | * C | |
45 | * D |
|
45 | * D | |
46 |
|
46 | |||
47 |
|
47 | |||
48 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
48 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
49 | HG: Leave message empty to abort commit. |
|
49 | HG: Leave message empty to abort commit. | |
50 | HG: -- |
|
50 | HG: -- | |
51 | HG: user: test |
|
51 | HG: user: test | |
52 | HG: branch 'default' |
|
52 | HG: branch 'default' | |
53 | HG: added B |
|
53 | HG: added B | |
54 | HG: added C |
|
54 | HG: added C | |
55 | HG: added D |
|
55 | HG: added D | |
56 | ==== |
|
56 | ==== | |
57 | saved backup bundle to $TESTTMP/phase/.hg/strip-backup/112478962961-cb2a9b47-rebase.hg |
|
57 | saved backup bundle to $TESTTMP/phase/.hg/strip-backup/112478962961-cb2a9b47-rebase.hg | |
58 |
|
58 | |||
59 | $ hg tglogp |
|
59 | $ hg tglogp | |
60 | o 3: 92fa5f5fe108 secret 'Collapsed revision |
|
60 | o 3: 92fa5f5fe108 secret 'Collapsed revision | |
61 | | * B |
|
61 | | * B | |
62 | | * C |
|
62 | | * C | |
63 | | * D |
|
63 | | * D | |
64 | | |
|
64 | | | |
65 | | |
|
65 | | | |
66 | | edited manually' |
|
66 | | edited manually' | |
67 | o 2: 64a8289d2492 draft 'F' |
|
67 | o 2: 64a8289d2492 draft 'F' | |
68 | | |
|
68 | | | |
69 | o 1: 7fb047a69f22 draft 'E' |
|
69 | o 1: 7fb047a69f22 draft 'E' | |
70 | | |
|
70 | | | |
71 | o 0: 426bada5c675 draft 'A' |
|
71 | o 0: 426bada5c675 draft 'A' | |
72 |
|
72 | |||
73 | $ hg manifest --rev tip |
|
73 | $ hg manifest --rev tip | |
74 | A |
|
74 | A | |
75 | B |
|
75 | B | |
76 | C |
|
76 | C | |
77 | D |
|
77 | D | |
78 | E |
|
78 | E | |
79 | F |
|
79 | F | |
80 |
|
80 | |||
81 | $ cd .. |
|
81 | $ cd .. | |
82 |
|
82 | |||
83 |
|
83 | |||
84 | Merge gets linearized: |
|
84 | Merge gets linearized: | |
85 |
|
85 | |||
86 | $ hg init linearized-merge |
|
86 | $ hg init linearized-merge | |
87 | $ cd linearized-merge |
|
87 | $ cd linearized-merge | |
88 |
|
88 | |||
89 | $ hg debugdrawdag << 'EOF' |
|
89 | $ hg debugdrawdag << 'EOF' | |
90 | > F D |
|
90 | > F D | |
91 | > |/| |
|
91 | > |/| | |
92 | > C B |
|
92 | > C B | |
93 | > |/ |
|
93 | > |/ | |
94 | > A |
|
94 | > A | |
95 | > EOF |
|
95 | > EOF | |
96 |
|
96 | |||
97 | $ hg phase --force --secret D |
|
97 | $ hg phase --force --secret D | |
98 | $ hg rebase --source B --collapse --dest F |
|
98 | $ hg rebase --source B --collapse --dest F | |
99 | rebasing 1:112478962961 "B" (B) |
|
99 | rebasing 1:112478962961 "B" (B) | |
100 | rebasing 3:4e4f9194f9f1 "D" (D) |
|
100 | rebasing 3:4e4f9194f9f1 "D" (D) | |
101 | saved backup bundle to $TESTTMP/linearized-merge/.hg/strip-backup/112478962961-e389075b-rebase.hg |
|
101 | saved backup bundle to $TESTTMP/linearized-merge/.hg/strip-backup/112478962961-e389075b-rebase.hg | |
102 |
|
102 | |||
103 | $ hg tglog |
|
103 | $ hg tglog | |
104 | o 3: 5bdc08b7da2b 'Collapsed revision |
|
104 | o 3: 5bdc08b7da2b 'Collapsed revision | |
105 | | * B |
|
105 | | * B | |
106 | | * D' |
|
106 | | * D' | |
107 | o 2: afc707c82df0 'F' |
|
107 | o 2: afc707c82df0 'F' | |
108 | | |
|
108 | | | |
109 | o 1: dc0947a82db8 'C' |
|
109 | o 1: dc0947a82db8 'C' | |
110 | | |
|
110 | | | |
111 | o 0: 426bada5c675 'A' |
|
111 | o 0: 426bada5c675 'A' | |
112 |
|
112 | |||
113 | $ hg manifest --rev tip |
|
113 | $ hg manifest --rev tip | |
114 | A |
|
114 | A | |
115 | B |
|
115 | B | |
116 | C |
|
116 | C | |
117 | F |
|
117 | F | |
118 |
|
118 | |||
119 | $ cd .. |
|
119 | $ cd .. | |
120 |
|
120 | |||
121 | Custom message: |
|
121 | Custom message: | |
122 |
|
122 | |||
123 | $ hg init message |
|
123 | $ hg init message | |
124 | $ cd message |
|
124 | $ cd message | |
125 |
|
125 | |||
126 | $ hg debugdrawdag << 'EOF' |
|
126 | $ hg debugdrawdag << 'EOF' | |
127 | > C |
|
127 | > C | |
128 | > | |
|
128 | > | | |
129 | > D B |
|
129 | > D B | |
130 | > |/ |
|
130 | > |/ | |
131 | > A |
|
131 | > A | |
132 | > EOF |
|
132 | > EOF | |
133 |
|
133 | |||
134 |
|
134 | |||
135 | $ hg rebase --base B -m 'custom message' |
|
135 | $ hg rebase --base B -m 'custom message' | |
136 | abort: message can only be specified with collapse |
|
136 | abort: message can only be specified with collapse | |
137 | [255] |
|
137 | [255] | |
138 |
|
138 | |||
139 | $ cat > $TESTTMP/checkeditform.sh <<EOF |
|
139 | $ cat > $TESTTMP/checkeditform.sh <<EOF | |
140 | > env | grep HGEDITFORM |
|
140 | > env | grep HGEDITFORM | |
141 | > true |
|
141 | > true | |
142 | > EOF |
|
142 | > EOF | |
143 | $ HGEDITOR="sh $TESTTMP/checkeditform.sh" hg rebase --source B --collapse -m 'custom message' -e --dest D |
|
143 | $ HGEDITOR="sh $TESTTMP/checkeditform.sh" hg rebase --source B --collapse -m 'custom message' -e --dest D | |
144 | rebasing 1:112478962961 "B" (B) |
|
144 | rebasing 1:112478962961 "B" (B) | |
145 | rebasing 3:26805aba1e60 "C" (C tip) |
|
145 | rebasing 3:26805aba1e60 "C" (C tip) | |
146 | HGEDITFORM=rebase.collapse |
|
146 | HGEDITFORM=rebase.collapse | |
147 | saved backup bundle to $TESTTMP/message/.hg/strip-backup/112478962961-f4131707-rebase.hg |
|
147 | saved backup bundle to $TESTTMP/message/.hg/strip-backup/112478962961-f4131707-rebase.hg | |
148 |
|
148 | |||
149 | $ hg tglog |
|
149 | $ hg tglog | |
150 | o 2: 2f197b9a08f3 'custom message' |
|
150 | o 2: 2f197b9a08f3 'custom message' | |
151 | | |
|
151 | | | |
152 | o 1: b18e25de2cf5 'D' |
|
152 | o 1: b18e25de2cf5 'D' | |
153 | | |
|
153 | | | |
154 | o 0: 426bada5c675 'A' |
|
154 | o 0: 426bada5c675 'A' | |
155 |
|
155 | |||
156 | $ hg manifest --rev tip |
|
156 | $ hg manifest --rev tip | |
157 | A |
|
157 | A | |
158 | B |
|
158 | B | |
159 | C |
|
159 | C | |
160 | D |
|
160 | D | |
161 |
|
161 | |||
162 | $ cd .. |
|
162 | $ cd .. | |
163 |
|
163 | |||
164 | Rebase and collapse - more than one external (fail): |
|
164 | Rebase and collapse - more than one external (fail): | |
165 |
|
165 | |||
166 | $ hg init multiple-external-parents |
|
166 | $ hg init multiple-external-parents | |
167 | $ cd multiple-external-parents |
|
167 | $ cd multiple-external-parents | |
168 |
|
168 | |||
169 | $ hg debugdrawdag << 'EOF' |
|
169 | $ hg debugdrawdag << 'EOF' | |
170 | > G |
|
170 | > G | |
171 | > |\ |
|
171 | > |\ | |
172 | > | F |
|
172 | > | F | |
173 | > | | |
|
173 | > | | | |
174 | > D E |
|
174 | > D E | |
175 | > |\| |
|
175 | > |\| | |
176 | > H C B |
|
176 | > H C B | |
177 | > \|/ |
|
177 | > \|/ | |
178 | > A |
|
178 | > A | |
179 | > EOF |
|
179 | > EOF | |
180 |
|
180 | |||
181 | $ hg rebase -s C --dest H --collapse |
|
181 | $ hg rebase -s C --dest H --collapse | |
182 | abort: unable to collapse on top of 3, there is more than one external parent: 1, 6 |
|
182 | abort: unable to collapse on top of 3, there is more than one external parent: 1, 6 | |
183 | [255] |
|
183 | [255] | |
184 |
|
184 | |||
185 | Rebase and collapse - E onto H: |
|
185 | Rebase and collapse - E onto H: | |
186 |
|
186 | |||
187 |
$ hg rebase -s E --dest |
|
187 | $ hg rebase -s E --dest H --collapse # root (E) is not a merge | |
188 | abort: unknown revision 'I'! |
|
188 | rebasing 5:49cb92066bfd "E" (E) | |
189 | [255] |
|
189 | rebasing 6:11abe3fb10b8 "F" (F) | |
|
190 | rebasing 7:64e264db77f0 "G" (G tip) | |||
|
191 | saved backup bundle to $TESTTMP/multiple-external-parents/.hg/strip-backup/49cb92066bfd-ee8a8a79-rebase.hg | |||
190 |
|
192 | |||
191 | $ hg tglog |
|
193 | $ hg tglog | |
192 | o 7: 64e264db77f0 'G' |
|
194 | o 5: 8b2315790719 'Collapsed revision | |
193 | |\ |
|
195 | |\ * E | |
194 | | o 6: 11abe3fb10b8 'F' |
|
196 | | | * F | |
195 |
|
|
197 | | | * G' | |
196 | | o 5: 49cb92066bfd 'E' |
|
198 | | o 4: 4e4f9194f9f1 'D' | |
|
199 | | |\ | |||
|
200 | o | | 3: 575c4b5ec114 'H' | |||
|
201 | | | | | |||
|
202 | +---o 2: dc0947a82db8 'C' | |||
197 | | | |
|
203 | | | | |
198 | o | 4: 4e4f9194f9f1 'D' |
|
204 | | o 1: 112478962961 'B' | |
199 | |\| |
|
|||
200 | | | o 3: 575c4b5ec114 'H' |
|
|||
201 | | | | |
|
|||
202 | o---+ 2: dc0947a82db8 'C' |
|
|||
203 | / / |
|
|||
204 | o / 1: 112478962961 'B' |
|
|||
205 | |/ |
|
205 | |/ | |
206 | o 0: 426bada5c675 'A' |
|
206 | o 0: 426bada5c675 'A' | |
207 |
|
207 | |||
208 | $ hg manifest --rev tip |
|
208 | $ hg manifest --rev tip | |
209 | A |
|
209 | A | |
210 | B |
|
|||
211 | C |
|
210 | C | |
212 | E |
|
211 | E | |
213 | F |
|
212 | F | |
|
213 | H | |||
214 |
|
214 | |||
215 | $ cd .. |
|
215 | $ cd .. | |
216 |
|
216 | |||
217 |
|
217 | |||
218 |
|
218 | |||
219 |
|
219 | |||
220 | Test that branchheads cache is updated correctly when doing a strip in which |
|
220 | Test that branchheads cache is updated correctly when doing a strip in which | |
221 | the parent of the ancestor node to be stripped does not become a head and also, |
|
221 | the parent of the ancestor node to be stripped does not become a head and also, | |
222 | the parent of a node that is a child of the node stripped becomes a head (node |
|
222 | the parent of a node that is a child of the node stripped becomes a head (node | |
223 | 3). The code is now much simpler and we could just test a simpler scenario |
|
223 | 3). The code is now much simpler and we could just test a simpler scenario | |
224 | We keep it the test this way in case new complexity is injected. |
|
224 | We keep it the test this way in case new complexity is injected. | |
225 |
|
225 | |||
226 | Create repo b: |
|
226 | Create repo b: | |
227 |
|
227 | |||
228 | $ hg init branch-heads |
|
228 | $ hg init branch-heads | |
229 | $ cd branch-heads |
|
229 | $ cd branch-heads | |
230 |
|
230 | |||
231 | $ hg debugdrawdag << 'EOF' |
|
231 | $ hg debugdrawdag << 'EOF' | |
232 | > G |
|
232 | > G | |
233 | > |\ |
|
233 | > |\ | |
234 | > | F |
|
234 | > | F | |
235 | > | | |
|
235 | > | | | |
236 | > D E |
|
236 | > D E | |
237 | > |\| |
|
237 | > |\| | |
238 | > H C B |
|
238 | > H C B | |
239 | > \|/ |
|
239 | > \|/ | |
240 | > A |
|
240 | > A | |
241 | > EOF |
|
241 | > EOF | |
242 |
|
242 | |||
243 | $ hg heads --template="{rev}:{node} {branch}\n" |
|
243 | $ hg heads --template="{rev}:{node} {branch}\n" | |
244 | 7:64e264db77f061f16d9132b70c5a58e2461fb630 default |
|
244 | 7:64e264db77f061f16d9132b70c5a58e2461fb630 default | |
245 | 3:575c4b5ec114d64b681d33f8792853568bfb2b2c default |
|
245 | 3:575c4b5ec114d64b681d33f8792853568bfb2b2c default | |
246 |
|
246 | |||
247 | $ cat $TESTTMP/branch-heads/.hg/cache/branch2-served |
|
247 | $ cat $TESTTMP/branch-heads/.hg/cache/branch2-served | |
248 | 64e264db77f061f16d9132b70c5a58e2461fb630 7 |
|
248 | 64e264db77f061f16d9132b70c5a58e2461fb630 7 | |
249 | 575c4b5ec114d64b681d33f8792853568bfb2b2c o default |
|
249 | 575c4b5ec114d64b681d33f8792853568bfb2b2c o default | |
250 | 64e264db77f061f16d9132b70c5a58e2461fb630 o default |
|
250 | 64e264db77f061f16d9132b70c5a58e2461fb630 o default | |
251 |
|
251 | |||
252 | $ hg strip 4 |
|
252 | $ hg strip 4 | |
253 | saved backup bundle to $TESTTMP/branch-heads/.hg/strip-backup/4e4f9194f9f1-5ec4b5e6-backup.hg |
|
253 | saved backup bundle to $TESTTMP/branch-heads/.hg/strip-backup/4e4f9194f9f1-5ec4b5e6-backup.hg | |
254 |
|
254 | |||
255 | $ cat $TESTTMP/branch-heads/.hg/cache/branch2-served |
|
255 | $ cat $TESTTMP/branch-heads/.hg/cache/branch2-served | |
256 | 11abe3fb10b8689b560681094b17fe161871d043 5 |
|
256 | 11abe3fb10b8689b560681094b17fe161871d043 5 | |
257 | dc0947a82db884575bb76ea10ac97b08536bfa03 o default |
|
257 | dc0947a82db884575bb76ea10ac97b08536bfa03 o default | |
258 | 575c4b5ec114d64b681d33f8792853568bfb2b2c o default |
|
258 | 575c4b5ec114d64b681d33f8792853568bfb2b2c o default | |
259 | 11abe3fb10b8689b560681094b17fe161871d043 o default |
|
259 | 11abe3fb10b8689b560681094b17fe161871d043 o default | |
260 |
|
260 | |||
261 | $ hg heads --template="{rev}:{node} {branch}\n" |
|
261 | $ hg heads --template="{rev}:{node} {branch}\n" | |
262 | 5:11abe3fb10b8689b560681094b17fe161871d043 default |
|
262 | 5:11abe3fb10b8689b560681094b17fe161871d043 default | |
263 | 3:575c4b5ec114d64b681d33f8792853568bfb2b2c default |
|
263 | 3:575c4b5ec114d64b681d33f8792853568bfb2b2c default | |
264 | 2:dc0947a82db884575bb76ea10ac97b08536bfa03 default |
|
264 | 2:dc0947a82db884575bb76ea10ac97b08536bfa03 default | |
265 |
|
265 | |||
266 | $ cd .. |
|
266 | $ cd .. | |
267 |
|
267 | |||
268 |
|
268 | |||
269 |
|
269 | |||
270 | Preserves external parent |
|
270 | Preserves external parent | |
271 |
|
271 | |||
272 | $ hg init external-parent |
|
272 | $ hg init external-parent | |
273 | $ cd external-parent |
|
273 | $ cd external-parent | |
274 |
|
274 | |||
275 | $ hg debugdrawdag << 'EOF' |
|
275 | $ hg debugdrawdag << 'EOF' | |
276 | > H |
|
276 | > H | |
277 | > |\ |
|
277 | > |\ | |
278 | > | G |
|
278 | > | G | |
279 | > | | |
|
279 | > | | | |
280 | > | F # F/E = F\n |
|
280 | > | F # F/E = F\n | |
281 | > | | |
|
281 | > | | | |
282 | > D E # D/D = D\n |
|
282 | > D E # D/D = D\n | |
283 | > |\| |
|
283 | > |\| | |
284 | > I C B |
|
284 | > I C B | |
285 | > \|/ |
|
285 | > \|/ | |
286 | > A |
|
286 | > A | |
287 | > EOF |
|
287 | > EOF | |
288 |
|
288 | |||
289 | $ hg rebase -s F --dest I --collapse # root (F) is not a merge |
|
289 | $ hg rebase -s F --dest I --collapse # root (F) is not a merge | |
290 | rebasing 6:c82b08f646f1 "F" (F) |
|
290 | rebasing 6:c82b08f646f1 "F" (F) | |
291 | file 'E' was deleted in local [dest] but was modified in other [source]. |
|
291 | file 'E' was deleted in local [dest] but was modified in other [source]. | |
292 | You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved. |
|
292 | You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved. | |
293 | What do you want to do? u |
|
293 | What do you want to do? u | |
294 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
294 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
295 | [1] |
|
295 | [1] | |
296 |
|
296 | |||
297 | $ echo F > E |
|
297 | $ echo F > E | |
298 | $ hg resolve -m |
|
298 | $ hg resolve -m | |
299 | (no more unresolved files) |
|
299 | (no more unresolved files) | |
300 | continue: hg rebase --continue |
|
300 | continue: hg rebase --continue | |
301 | $ hg rebase -c |
|
301 | $ hg rebase -c | |
302 | rebasing 6:c82b08f646f1 "F" (F) |
|
302 | rebasing 6:c82b08f646f1 "F" (F) | |
303 | rebasing 7:a6db7fa104e1 "G" (G) |
|
303 | rebasing 7:a6db7fa104e1 "G" (G) | |
304 | rebasing 8:e1d201b72d91 "H" (H tip) |
|
304 | rebasing 8:e1d201b72d91 "H" (H tip) | |
305 | saved backup bundle to $TESTTMP/external-parent/.hg/strip-backup/c82b08f646f1-f2721fbf-rebase.hg |
|
305 | saved backup bundle to $TESTTMP/external-parent/.hg/strip-backup/c82b08f646f1-f2721fbf-rebase.hg | |
306 |
|
306 | |||
307 | $ hg tglog |
|
307 | $ hg tglog | |
308 | o 6: 681daa3e686d 'Collapsed revision |
|
308 | o 6: 681daa3e686d 'Collapsed revision | |
309 | |\ * F |
|
309 | |\ * F | |
310 | | | * G |
|
310 | | | * G | |
311 | | | * H' |
|
311 | | | * H' | |
312 | | | o 5: 49cb92066bfd 'E' |
|
312 | | | o 5: 49cb92066bfd 'E' | |
313 | | | | |
|
313 | | | | | |
314 | | o | 4: 09143c0bf13e 'D' |
|
314 | | o | 4: 09143c0bf13e 'D' | |
315 | | |\| |
|
315 | | |\| | |
316 | o | | 3: 08ebfeb61bac 'I' |
|
316 | o | | 3: 08ebfeb61bac 'I' | |
317 | | | | |
|
317 | | | | | |
318 | | o | 2: dc0947a82db8 'C' |
|
318 | | o | 2: dc0947a82db8 'C' | |
319 | |/ / |
|
319 | |/ / | |
320 | | o 1: 112478962961 'B' |
|
320 | | o 1: 112478962961 'B' | |
321 | |/ |
|
321 | |/ | |
322 | o 0: 426bada5c675 'A' |
|
322 | o 0: 426bada5c675 'A' | |
323 |
|
323 | |||
324 | $ hg manifest --rev tip |
|
324 | $ hg manifest --rev tip | |
325 | A |
|
325 | A | |
326 | C |
|
326 | C | |
327 | D |
|
327 | D | |
328 | E |
|
328 | E | |
329 | F |
|
329 | F | |
330 | G |
|
330 | G | |
331 | I |
|
331 | I | |
332 |
|
332 | |||
333 | $ hg up tip -q |
|
333 | $ hg up tip -q | |
334 | $ cat E |
|
334 | $ cat E | |
335 | F |
|
335 | F | |
336 |
|
336 | |||
337 | $ cd .. |
|
337 | $ cd .. | |
338 |
|
338 | |||
339 | Rebasing from multiple bases: |
|
339 | Rebasing from multiple bases: | |
340 |
|
340 | |||
341 | $ hg init multiple-bases |
|
341 | $ hg init multiple-bases | |
342 | $ cd multiple-bases |
|
342 | $ cd multiple-bases | |
343 | $ hg debugdrawdag << 'EOF' |
|
343 | $ hg debugdrawdag << 'EOF' | |
344 | > C B |
|
344 | > C B | |
345 | > D |/ |
|
345 | > D |/ | |
346 | > |/ |
|
346 | > |/ | |
347 | > A |
|
347 | > A | |
348 | > EOF |
|
348 | > EOF | |
349 | $ hg rebase --collapse -r 'B+C' -d D |
|
349 | $ hg rebase --collapse -r 'B+C' -d D | |
350 | rebasing 1:fc2b737bb2e5 "B" (B) |
|
350 | rebasing 1:fc2b737bb2e5 "B" (B) | |
351 | rebasing 2:dc0947a82db8 "C" (C) |
|
351 | rebasing 2:dc0947a82db8 "C" (C) | |
352 | saved backup bundle to $TESTTMP/multiple-bases/.hg/strip-backup/dc0947a82db8-b0c1a7ea-rebase.hg |
|
352 | saved backup bundle to $TESTTMP/multiple-bases/.hg/strip-backup/dc0947a82db8-b0c1a7ea-rebase.hg | |
353 | $ hg tglog |
|
353 | $ hg tglog | |
354 | o 2: 2127ae44d291 'Collapsed revision |
|
354 | o 2: 2127ae44d291 'Collapsed revision | |
355 | | * B |
|
355 | | * B | |
356 | | * C' |
|
356 | | * C' | |
357 | o 1: b18e25de2cf5 'D' |
|
357 | o 1: b18e25de2cf5 'D' | |
358 | | |
|
358 | | | |
359 | o 0: 426bada5c675 'A' |
|
359 | o 0: 426bada5c675 'A' | |
360 |
|
360 | |||
361 | $ cd .. |
|
361 | $ cd .. | |
362 |
|
362 | |||
363 | With non-contiguous commits: |
|
363 | With non-contiguous commits: | |
364 |
|
364 | |||
365 | $ hg init non-contiguous |
|
365 | $ hg init non-contiguous | |
366 | $ cd non-contiguous |
|
366 | $ cd non-contiguous | |
367 | $ cat >> .hg/hgrc <<EOF |
|
367 | $ cat >> .hg/hgrc <<EOF | |
368 | > [experimental] |
|
368 | > [experimental] | |
369 | > evolution=all |
|
369 | > evolution=all | |
370 | > EOF |
|
370 | > EOF | |
371 |
|
371 | |||
372 | $ hg debugdrawdag << 'EOF' |
|
372 | $ hg debugdrawdag << 'EOF' | |
373 | > F |
|
373 | > F | |
374 | > | |
|
374 | > | | |
375 | > E |
|
375 | > E | |
376 | > | |
|
376 | > | | |
377 | > D |
|
377 | > D | |
378 | > | |
|
378 | > | | |
379 | > C |
|
379 | > C | |
380 | > | |
|
380 | > | | |
381 | > B G |
|
381 | > B G | |
382 | > |/ |
|
382 | > |/ | |
383 | > A |
|
383 | > A | |
384 | > EOF |
|
384 | > EOF | |
385 |
|
385 | |||
386 | BROKEN: should be allowed |
|
386 | BROKEN: should be allowed | |
387 | $ hg rebase --collapse -r 'B+D+F' -d G |
|
387 | $ hg rebase --collapse -r 'B+D+F' -d G | |
388 | abort: unable to collapse on top of 2, there is more than one external parent: 3, 5 |
|
388 | abort: unable to collapse on top of 2, there is more than one external parent: 3, 5 | |
389 | [255] |
|
389 | [255] | |
390 | $ cd .. |
|
390 | $ cd .. | |
391 |
|
391 | |||
392 |
|
392 | |||
393 | $ hg init multiple-external-parents-2 |
|
393 | $ hg init multiple-external-parents-2 | |
394 | $ cd multiple-external-parents-2 |
|
394 | $ cd multiple-external-parents-2 | |
395 | $ hg debugdrawdag << 'EOF' |
|
395 | $ hg debugdrawdag << 'EOF' | |
396 | > D G |
|
396 | > D G | |
397 | > |\ /| |
|
397 | > |\ /| | |
398 | > B C E F |
|
398 | > B C E F | |
399 | > \| |/ |
|
399 | > \| |/ | |
400 | > \ H / |
|
400 | > \ H / | |
401 | > \|/ |
|
401 | > \|/ | |
402 | > A |
|
402 | > A | |
403 | > EOF |
|
403 | > EOF | |
404 |
|
404 | |||
405 | $ hg rebase --collapse -d H -s 'B+F' |
|
405 | $ hg rebase --collapse -d H -s 'B+F' | |
406 | abort: unable to collapse on top of 5, there is more than one external parent: 1, 3 |
|
406 | abort: unable to collapse on top of 5, there is more than one external parent: 1, 3 | |
407 | [255] |
|
407 | [255] | |
408 | $ cd .. |
|
408 | $ cd .. | |
409 |
|
409 | |||
410 | With internal merge: |
|
410 | With internal merge: | |
411 |
|
411 | |||
412 | $ hg init internal-merge |
|
412 | $ hg init internal-merge | |
413 | $ cd internal-merge |
|
413 | $ cd internal-merge | |
414 |
|
414 | |||
415 | $ hg debugdrawdag << 'EOF' |
|
415 | $ hg debugdrawdag << 'EOF' | |
416 | > E |
|
416 | > E | |
417 | > |\ |
|
417 | > |\ | |
418 | > C D |
|
418 | > C D | |
419 | > |/ |
|
419 | > |/ | |
420 | > F B |
|
420 | > F B | |
421 | > |/ |
|
421 | > |/ | |
422 | > A |
|
422 | > A | |
423 | > EOF |
|
423 | > EOF | |
424 |
|
424 | |||
425 |
|
425 | |||
426 | $ hg rebase -s B --collapse --dest F |
|
426 | $ hg rebase -s B --collapse --dest F | |
427 | rebasing 1:112478962961 "B" (B) |
|
427 | rebasing 1:112478962961 "B" (B) | |
428 | rebasing 3:26805aba1e60 "C" (C) |
|
428 | rebasing 3:26805aba1e60 "C" (C) | |
429 | rebasing 4:be0ef73c17ad "D" (D) |
|
429 | rebasing 4:be0ef73c17ad "D" (D) | |
430 | rebasing 5:02c4367d6973 "E" (E tip) |
|
430 | rebasing 5:02c4367d6973 "E" (E tip) | |
431 | saved backup bundle to $TESTTMP/internal-merge/.hg/strip-backup/112478962961-1dfb057b-rebase.hg |
|
431 | saved backup bundle to $TESTTMP/internal-merge/.hg/strip-backup/112478962961-1dfb057b-rebase.hg | |
432 |
|
432 | |||
433 | $ hg tglog |
|
433 | $ hg tglog | |
434 | o 2: c0512a1797b0 'Collapsed revision |
|
434 | o 2: c0512a1797b0 'Collapsed revision | |
435 | | * B |
|
435 | | * B | |
436 | | * C |
|
436 | | * C | |
437 | | * D |
|
437 | | * D | |
438 | | * E' |
|
438 | | * E' | |
439 | o 1: 8908a377a434 'F' |
|
439 | o 1: 8908a377a434 'F' | |
440 | | |
|
440 | | | |
441 | o 0: 426bada5c675 'A' |
|
441 | o 0: 426bada5c675 'A' | |
442 |
|
442 | |||
443 | $ hg manifest --rev tip |
|
443 | $ hg manifest --rev tip | |
444 | A |
|
444 | A | |
445 | B |
|
445 | B | |
446 | C |
|
446 | C | |
447 | D |
|
447 | D | |
448 | F |
|
448 | F | |
449 | $ cd .. |
|
449 | $ cd .. | |
450 |
|
450 | |||
451 | Interactions between collapse and keepbranches |
|
451 | Interactions between collapse and keepbranches | |
452 | $ hg init e |
|
452 | $ hg init e | |
453 | $ cd e |
|
453 | $ cd e | |
454 | $ echo 'a' > a |
|
454 | $ echo 'a' > a | |
455 | $ hg ci -Am 'A' |
|
455 | $ hg ci -Am 'A' | |
456 | adding a |
|
456 | adding a | |
457 |
|
457 | |||
458 | $ hg branch 'one' |
|
458 | $ hg branch 'one' | |
459 | marked working directory as branch one |
|
459 | marked working directory as branch one | |
460 | (branches are permanent and global, did you want a bookmark?) |
|
460 | (branches are permanent and global, did you want a bookmark?) | |
461 | $ echo 'b' > b |
|
461 | $ echo 'b' > b | |
462 | $ hg ci -Am 'B' |
|
462 | $ hg ci -Am 'B' | |
463 | adding b |
|
463 | adding b | |
464 |
|
464 | |||
465 | $ hg branch 'two' |
|
465 | $ hg branch 'two' | |
466 | marked working directory as branch two |
|
466 | marked working directory as branch two | |
467 | $ echo 'c' > c |
|
467 | $ echo 'c' > c | |
468 | $ hg ci -Am 'C' |
|
468 | $ hg ci -Am 'C' | |
469 | adding c |
|
469 | adding c | |
470 |
|
470 | |||
471 | $ hg up -q 0 |
|
471 | $ hg up -q 0 | |
472 | $ echo 'd' > d |
|
472 | $ echo 'd' > d | |
473 | $ hg ci -Am 'D' |
|
473 | $ hg ci -Am 'D' | |
474 | adding d |
|
474 | adding d | |
475 |
|
475 | |||
476 | $ hg tglog |
|
476 | $ hg tglog | |
477 | @ 3: 41acb9dca9eb 'D' |
|
477 | @ 3: 41acb9dca9eb 'D' | |
478 | | |
|
478 | | | |
479 | | o 2: 8ac4a08debf1 'C' two |
|
479 | | o 2: 8ac4a08debf1 'C' two | |
480 | | | |
|
480 | | | | |
481 | | o 1: 1ba175478953 'B' one |
|
481 | | o 1: 1ba175478953 'B' one | |
482 | |/ |
|
482 | |/ | |
483 | o 0: 1994f17a630e 'A' |
|
483 | o 0: 1994f17a630e 'A' | |
484 |
|
484 | |||
485 | $ hg rebase --keepbranches --collapse -s 1 -d 3 |
|
485 | $ hg rebase --keepbranches --collapse -s 1 -d 3 | |
486 | abort: cannot collapse multiple named branches |
|
486 | abort: cannot collapse multiple named branches | |
487 | [255] |
|
487 | [255] | |
488 |
|
488 | |||
489 | $ cd .. |
|
489 | $ cd .. | |
490 |
|
490 | |||
491 | Rebase, collapse and copies |
|
491 | Rebase, collapse and copies | |
492 |
|
492 | |||
493 | $ hg init copies |
|
493 | $ hg init copies | |
494 | $ cd copies |
|
494 | $ cd copies | |
495 | $ hg unbundle "$TESTDIR/bundles/renames.hg" |
|
495 | $ hg unbundle "$TESTDIR/bundles/renames.hg" | |
496 | adding changesets |
|
496 | adding changesets | |
497 | adding manifests |
|
497 | adding manifests | |
498 | adding file changes |
|
498 | adding file changes | |
499 | added 4 changesets with 11 changes to 7 files (+1 heads) |
|
499 | added 4 changesets with 11 changes to 7 files (+1 heads) | |
500 | new changesets f447d5abf5ea:338e84e2e558 (4 drafts) |
|
500 | new changesets f447d5abf5ea:338e84e2e558 (4 drafts) | |
501 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
501 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
502 | $ hg up -q tip |
|
502 | $ hg up -q tip | |
503 | $ hg tglog |
|
503 | $ hg tglog | |
504 | @ 3: 338e84e2e558 'move2' |
|
504 | @ 3: 338e84e2e558 'move2' | |
505 | | |
|
505 | | | |
506 | o 2: 6e7340ee38c0 'move1' |
|
506 | o 2: 6e7340ee38c0 'move1' | |
507 | | |
|
507 | | | |
508 | | o 1: 1352765a01d4 'change' |
|
508 | | o 1: 1352765a01d4 'change' | |
509 | |/ |
|
509 | |/ | |
510 | o 0: f447d5abf5ea 'add' |
|
510 | o 0: f447d5abf5ea 'add' | |
511 |
|
511 | |||
512 | $ hg rebase --collapse -d 1 |
|
512 | $ hg rebase --collapse -d 1 | |
513 | rebasing 2:6e7340ee38c0 "move1" |
|
513 | rebasing 2:6e7340ee38c0 "move1" | |
514 | merging a and d to d |
|
514 | merging a and d to d | |
515 | merging b and e to e |
|
515 | merging b and e to e | |
516 | merging c and f to f |
|
516 | merging c and f to f | |
517 | rebasing 3:338e84e2e558 "move2" (tip) |
|
517 | rebasing 3:338e84e2e558 "move2" (tip) | |
518 | merging f and c to c |
|
518 | merging f and c to c | |
519 | merging e and g to g |
|
519 | merging e and g to g | |
520 | saved backup bundle to $TESTTMP/copies/.hg/strip-backup/6e7340ee38c0-ef8ef003-rebase.hg |
|
520 | saved backup bundle to $TESTTMP/copies/.hg/strip-backup/6e7340ee38c0-ef8ef003-rebase.hg | |
521 | $ hg st |
|
521 | $ hg st | |
522 | $ hg st --copies --change tip |
|
522 | $ hg st --copies --change tip | |
523 | A d |
|
523 | A d | |
524 | a |
|
524 | a | |
525 | A g |
|
525 | A g | |
526 | b |
|
526 | b | |
527 | R b |
|
527 | R b | |
528 | $ hg up tip -q |
|
528 | $ hg up tip -q | |
529 | $ cat c |
|
529 | $ cat c | |
530 | c |
|
530 | c | |
531 | c |
|
531 | c | |
532 | $ cat d |
|
532 | $ cat d | |
533 | a |
|
533 | a | |
534 | a |
|
534 | a | |
535 | $ cat g |
|
535 | $ cat g | |
536 | b |
|
536 | b | |
537 | b |
|
537 | b | |
538 | $ hg log -r . --template "{file_copies}\n" |
|
538 | $ hg log -r . --template "{file_copies}\n" | |
539 | d (a)g (b) |
|
539 | d (a)g (b) | |
540 |
|
540 | |||
541 | Test collapsing a middle revision in-place |
|
541 | Test collapsing a middle revision in-place | |
542 |
|
542 | |||
543 | $ hg tglog |
|
543 | $ hg tglog | |
544 | @ 2: 64b456429f67 'Collapsed revision |
|
544 | @ 2: 64b456429f67 'Collapsed revision | |
545 | | * move1 |
|
545 | | * move1 | |
546 | | * move2' |
|
546 | | * move2' | |
547 | o 1: 1352765a01d4 'change' |
|
547 | o 1: 1352765a01d4 'change' | |
548 | | |
|
548 | | | |
549 | o 0: f447d5abf5ea 'add' |
|
549 | o 0: f447d5abf5ea 'add' | |
550 |
|
550 | |||
551 | $ hg rebase --collapse -r 1 -d 0 |
|
551 | $ hg rebase --collapse -r 1 -d 0 | |
552 | abort: cannot rebase changeset with children |
|
552 | abort: cannot rebase changeset with children | |
553 | (use --keep to keep original changesets) |
|
553 | (use --keep to keep original changesets) | |
554 | [255] |
|
554 | [255] | |
555 |
|
555 | |||
556 | Test collapsing in place |
|
556 | Test collapsing in place | |
557 |
|
557 | |||
558 | $ hg rebase --collapse -b . -d 0 |
|
558 | $ hg rebase --collapse -b . -d 0 | |
559 | rebasing 1:1352765a01d4 "change" |
|
559 | rebasing 1:1352765a01d4 "change" | |
560 | rebasing 2:64b456429f67 "Collapsed revision" (tip) |
|
560 | rebasing 2:64b456429f67 "Collapsed revision" (tip) | |
561 | saved backup bundle to $TESTTMP/copies/.hg/strip-backup/1352765a01d4-45a352ea-rebase.hg |
|
561 | saved backup bundle to $TESTTMP/copies/.hg/strip-backup/1352765a01d4-45a352ea-rebase.hg | |
562 | $ hg st --change tip --copies |
|
562 | $ hg st --change tip --copies | |
563 | M a |
|
563 | M a | |
564 | M c |
|
564 | M c | |
565 | A d |
|
565 | A d | |
566 | a |
|
566 | a | |
567 | A g |
|
567 | A g | |
568 | b |
|
568 | b | |
569 | R b |
|
569 | R b | |
570 | $ hg up tip -q |
|
570 | $ hg up tip -q | |
571 | $ cat a |
|
571 | $ cat a | |
572 | a |
|
572 | a | |
573 | a |
|
573 | a | |
574 | $ cat c |
|
574 | $ cat c | |
575 | c |
|
575 | c | |
576 | c |
|
576 | c | |
577 | $ cat d |
|
577 | $ cat d | |
578 | a |
|
578 | a | |
579 | a |
|
579 | a | |
580 | $ cat g |
|
580 | $ cat g | |
581 | b |
|
581 | b | |
582 | b |
|
582 | b | |
583 | $ cd .. |
|
583 | $ cd .. | |
584 |
|
584 | |||
585 |
|
585 | |||
586 | Test stripping a revision with another child |
|
586 | Test stripping a revision with another child | |
587 |
|
587 | |||
588 | $ hg init f |
|
588 | $ hg init f | |
589 | $ cd f |
|
589 | $ cd f | |
590 |
|
590 | |||
591 | $ hg debugdrawdag << 'EOF' |
|
591 | $ hg debugdrawdag << 'EOF' | |
592 | > C B |
|
592 | > C B | |
593 | > |/ |
|
593 | > |/ | |
594 | > A |
|
594 | > A | |
595 | > EOF |
|
595 | > EOF | |
596 |
|
596 | |||
597 | $ hg heads --template="{rev}:{node} {branch}: {desc}\n" |
|
597 | $ hg heads --template="{rev}:{node} {branch}: {desc}\n" | |
598 | 2:dc0947a82db884575bb76ea10ac97b08536bfa03 default: C |
|
598 | 2:dc0947a82db884575bb76ea10ac97b08536bfa03 default: C | |
599 | 1:112478962961147124edd43549aedd1a335e44bf default: B |
|
599 | 1:112478962961147124edd43549aedd1a335e44bf default: B | |
600 |
|
600 | |||
601 | $ hg strip C |
|
601 | $ hg strip C | |
602 | saved backup bundle to $TESTTMP/f/.hg/strip-backup/dc0947a82db8-d21b92a4-backup.hg |
|
602 | saved backup bundle to $TESTTMP/f/.hg/strip-backup/dc0947a82db8-d21b92a4-backup.hg | |
603 |
|
603 | |||
604 | $ hg tglog |
|
604 | $ hg tglog | |
605 | o 1: 112478962961 'B' |
|
605 | o 1: 112478962961 'B' | |
606 | | |
|
606 | | | |
607 | o 0: 426bada5c675 'A' |
|
607 | o 0: 426bada5c675 'A' | |
608 |
|
608 | |||
609 |
|
609 | |||
610 |
|
610 | |||
611 | $ hg heads --template="{rev}:{node} {branch}: {desc}\n" |
|
611 | $ hg heads --template="{rev}:{node} {branch}: {desc}\n" | |
612 | 1:112478962961147124edd43549aedd1a335e44bf default: B |
|
612 | 1:112478962961147124edd43549aedd1a335e44bf default: B | |
613 |
|
613 | |||
614 | $ cd .. |
|
614 | $ cd .. | |
615 |
|
615 | |||
616 | Test collapsing changes that add then remove a file |
|
616 | Test collapsing changes that add then remove a file | |
617 |
|
617 | |||
618 | $ hg init collapseaddremove |
|
618 | $ hg init collapseaddremove | |
619 | $ cd collapseaddremove |
|
619 | $ cd collapseaddremove | |
620 |
|
620 | |||
621 | $ touch base |
|
621 | $ touch base | |
622 | $ hg commit -Am base |
|
622 | $ hg commit -Am base | |
623 | adding base |
|
623 | adding base | |
624 | $ touch a |
|
624 | $ touch a | |
625 | $ hg commit -Am a |
|
625 | $ hg commit -Am a | |
626 | adding a |
|
626 | adding a | |
627 | $ hg rm a |
|
627 | $ hg rm a | |
628 | $ touch b |
|
628 | $ touch b | |
629 | $ hg commit -Am b |
|
629 | $ hg commit -Am b | |
630 | adding b |
|
630 | adding b | |
631 | $ hg book foo |
|
631 | $ hg book foo | |
632 | $ hg rebase -d 0 -r "1::2" --collapse -m collapsed |
|
632 | $ hg rebase -d 0 -r "1::2" --collapse -m collapsed | |
633 | rebasing 1:6d8d9f24eec3 "a" |
|
633 | rebasing 1:6d8d9f24eec3 "a" | |
634 | rebasing 2:1cc73eca5ecc "b" (foo tip) |
|
634 | rebasing 2:1cc73eca5ecc "b" (foo tip) | |
635 | saved backup bundle to $TESTTMP/collapseaddremove/.hg/strip-backup/6d8d9f24eec3-77d3b6e2-rebase.hg |
|
635 | saved backup bundle to $TESTTMP/collapseaddremove/.hg/strip-backup/6d8d9f24eec3-77d3b6e2-rebase.hg | |
636 | $ hg log -G --template "{rev}: '{desc}' {bookmarks}" |
|
636 | $ hg log -G --template "{rev}: '{desc}' {bookmarks}" | |
637 | @ 1: 'collapsed' foo |
|
637 | @ 1: 'collapsed' foo | |
638 | | |
|
638 | | | |
639 | o 0: 'base' |
|
639 | o 0: 'base' | |
640 |
|
640 | |||
641 | $ hg manifest --rev tip |
|
641 | $ hg manifest --rev tip | |
642 | b |
|
642 | b | |
643 | base |
|
643 | base | |
644 |
|
644 | |||
645 | $ cd .. |
|
645 | $ cd .. | |
646 |
|
646 | |||
647 | Test that rebase --collapse will remember message after |
|
647 | Test that rebase --collapse will remember message after | |
648 | running into merge conflict and invoking rebase --continue. |
|
648 | running into merge conflict and invoking rebase --continue. | |
649 |
|
649 | |||
650 | $ hg init collapse_remember_message |
|
650 | $ hg init collapse_remember_message | |
651 | $ cd collapse_remember_message |
|
651 | $ cd collapse_remember_message | |
652 | $ hg debugdrawdag << 'EOF' |
|
652 | $ hg debugdrawdag << 'EOF' | |
653 | > C B # B/A = B\n |
|
653 | > C B # B/A = B\n | |
654 | > |/ # C/A = C\n |
|
654 | > |/ # C/A = C\n | |
655 | > A |
|
655 | > A | |
656 | > EOF |
|
656 | > EOF | |
657 | $ hg rebase --collapse -m "new message" -b B -d C |
|
657 | $ hg rebase --collapse -m "new message" -b B -d C | |
658 | rebasing 1:81e5401e4d37 "B" (B) |
|
658 | rebasing 1:81e5401e4d37 "B" (B) | |
659 | merging A |
|
659 | merging A | |
660 | warning: conflicts while merging A! (edit, then use 'hg resolve --mark') |
|
660 | warning: conflicts while merging A! (edit, then use 'hg resolve --mark') | |
661 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
661 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
662 | [1] |
|
662 | [1] | |
663 | $ rm A.orig |
|
663 | $ rm A.orig | |
664 | $ hg resolve --mark A |
|
664 | $ hg resolve --mark A | |
665 | (no more unresolved files) |
|
665 | (no more unresolved files) | |
666 | continue: hg rebase --continue |
|
666 | continue: hg rebase --continue | |
667 | $ hg rebase --continue |
|
667 | $ hg rebase --continue | |
668 | rebasing 1:81e5401e4d37 "B" (B) |
|
668 | rebasing 1:81e5401e4d37 "B" (B) | |
669 | saved backup bundle to $TESTTMP/collapse_remember_message/.hg/strip-backup/81e5401e4d37-96c3dd30-rebase.hg |
|
669 | saved backup bundle to $TESTTMP/collapse_remember_message/.hg/strip-backup/81e5401e4d37-96c3dd30-rebase.hg | |
670 | $ hg log |
|
670 | $ hg log | |
671 | changeset: 2:17186933e123 |
|
671 | changeset: 2:17186933e123 | |
672 | tag: tip |
|
672 | tag: tip | |
673 | user: test |
|
673 | user: test | |
674 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
674 | date: Thu Jan 01 00:00:00 1970 +0000 | |
675 | summary: new message |
|
675 | summary: new message | |
676 |
|
676 | |||
677 | changeset: 1:043039e9df84 |
|
677 | changeset: 1:043039e9df84 | |
678 | tag: C |
|
678 | tag: C | |
679 | user: test |
|
679 | user: test | |
680 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
680 | date: Thu Jan 01 00:00:00 1970 +0000 | |
681 | summary: C |
|
681 | summary: C | |
682 |
|
682 | |||
683 | changeset: 0:426bada5c675 |
|
683 | changeset: 0:426bada5c675 | |
684 | tag: A |
|
684 | tag: A | |
685 | user: test |
|
685 | user: test | |
686 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
686 | date: Thu Jan 01 00:00:00 1970 +0000 | |
687 | summary: A |
|
687 | summary: A | |
688 |
|
688 | |||
689 | $ cd .. |
|
689 | $ cd .. | |
690 |
|
690 | |||
691 | Test aborted editor on final message |
|
691 | Test aborted editor on final message | |
692 |
|
692 | |||
693 | $ HGMERGE=:merge3 |
|
693 | $ HGMERGE=:merge3 | |
694 | $ export HGMERGE |
|
694 | $ export HGMERGE | |
695 | $ hg init aborted-editor |
|
695 | $ hg init aborted-editor | |
696 | $ cd aborted-editor |
|
696 | $ cd aborted-editor | |
697 | $ hg debugdrawdag << 'EOF' |
|
697 | $ hg debugdrawdag << 'EOF' | |
698 | > C # D/A = D\n |
|
698 | > C # D/A = D\n | |
699 | > | # C/A = C\n |
|
699 | > | # C/A = C\n | |
700 | > B D # B/A = B\n |
|
700 | > B D # B/A = B\n | |
701 | > |/ # A/A = A\n |
|
701 | > |/ # A/A = A\n | |
702 | > A |
|
702 | > A | |
703 | > EOF |
|
703 | > EOF | |
704 | $ hg rebase --collapse -t internal:merge3 -s B -d D |
|
704 | $ hg rebase --collapse -t internal:merge3 -s B -d D | |
705 | rebasing 1:f899f3910ce7 "B" (B) |
|
705 | rebasing 1:f899f3910ce7 "B" (B) | |
706 | merging A |
|
706 | merging A | |
707 | warning: conflicts while merging A! (edit, then use 'hg resolve --mark') |
|
707 | warning: conflicts while merging A! (edit, then use 'hg resolve --mark') | |
708 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
708 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
709 | [1] |
|
709 | [1] | |
710 | $ hg tglog |
|
710 | $ hg tglog | |
711 | o 3: 63668d570d21 'C' |
|
711 | o 3: 63668d570d21 'C' | |
712 | | |
|
712 | | | |
713 | | @ 2: 82b8abf9c185 'D' |
|
713 | | @ 2: 82b8abf9c185 'D' | |
714 | | | |
|
714 | | | | |
715 | % | 1: f899f3910ce7 'B' |
|
715 | % | 1: f899f3910ce7 'B' | |
716 | |/ |
|
716 | |/ | |
717 | o 0: 4a2df7238c3b 'A' |
|
717 | o 0: 4a2df7238c3b 'A' | |
718 |
|
718 | |||
719 | $ cat A |
|
719 | $ cat A | |
720 | <<<<<<< dest: 82b8abf9c185 D - test: D |
|
720 | <<<<<<< dest: 82b8abf9c185 D - test: D | |
721 | D |
|
721 | D | |
722 | ||||||| base |
|
722 | ||||||| base | |
723 | A |
|
723 | A | |
724 | ======= |
|
724 | ======= | |
725 | B |
|
725 | B | |
726 | >>>>>>> source: f899f3910ce7 B - test: B |
|
726 | >>>>>>> source: f899f3910ce7 B - test: B | |
727 | $ echo BC > A |
|
727 | $ echo BC > A | |
728 | $ hg resolve -m |
|
728 | $ hg resolve -m | |
729 | (no more unresolved files) |
|
729 | (no more unresolved files) | |
730 | continue: hg rebase --continue |
|
730 | continue: hg rebase --continue | |
731 | $ hg rebase --continue |
|
731 | $ hg rebase --continue | |
732 | rebasing 1:f899f3910ce7 "B" (B) |
|
732 | rebasing 1:f899f3910ce7 "B" (B) | |
733 | rebasing 3:63668d570d21 "C" (C tip) |
|
733 | rebasing 3:63668d570d21 "C" (C tip) | |
734 | merging A |
|
734 | merging A | |
735 | warning: conflicts while merging A! (edit, then use 'hg resolve --mark') |
|
735 | warning: conflicts while merging A! (edit, then use 'hg resolve --mark') | |
736 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
736 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
737 | [1] |
|
737 | [1] | |
738 | $ hg tglog |
|
738 | $ hg tglog | |
739 | % 3: 63668d570d21 'C' |
|
739 | % 3: 63668d570d21 'C' | |
740 | | |
|
740 | | | |
741 | | @ 2: 82b8abf9c185 'D' |
|
741 | | @ 2: 82b8abf9c185 'D' | |
742 | | | |
|
742 | | | | |
743 | o | 1: f899f3910ce7 'B' |
|
743 | o | 1: f899f3910ce7 'B' | |
744 | |/ |
|
744 | |/ | |
745 | o 0: 4a2df7238c3b 'A' |
|
745 | o 0: 4a2df7238c3b 'A' | |
746 |
|
746 | |||
747 | $ cat A |
|
747 | $ cat A | |
748 | <<<<<<< dest: 82b8abf9c185 D - test: D |
|
748 | <<<<<<< dest: 82b8abf9c185 D - test: D | |
749 | BC |
|
749 | BC | |
750 | ||||||| base |
|
750 | ||||||| base | |
751 | B |
|
751 | B | |
752 | ======= |
|
752 | ======= | |
753 | C |
|
753 | C | |
754 | >>>>>>> source: 63668d570d21 C tip - test: C |
|
754 | >>>>>>> source: 63668d570d21 C tip - test: C | |
755 | $ echo BD > A |
|
755 | $ echo BD > A | |
756 | $ hg resolve -m |
|
756 | $ hg resolve -m | |
757 | (no more unresolved files) |
|
757 | (no more unresolved files) | |
758 | continue: hg rebase --continue |
|
758 | continue: hg rebase --continue | |
759 | $ HGEDITOR=false hg rebase --continue --config ui.interactive=1 |
|
759 | $ HGEDITOR=false hg rebase --continue --config ui.interactive=1 | |
760 | already rebased 1:f899f3910ce7 "B" (B) as 82b8abf9c185 |
|
760 | already rebased 1:f899f3910ce7 "B" (B) as 82b8abf9c185 | |
761 | rebasing 3:63668d570d21 "C" (C tip) |
|
761 | rebasing 3:63668d570d21 "C" (C tip) | |
762 | abort: edit failed: false exited with status 1 |
|
762 | abort: edit failed: false exited with status 1 | |
763 | [255] |
|
763 | [255] | |
764 | $ hg tglog |
|
764 | $ hg tglog | |
765 | % 3: 63668d570d21 'C' |
|
765 | % 3: 63668d570d21 'C' | |
766 | | |
|
766 | | | |
767 | | @ 2: 82b8abf9c185 'D' |
|
767 | | @ 2: 82b8abf9c185 'D' | |
768 | | | |
|
768 | | | | |
769 | o | 1: f899f3910ce7 'B' |
|
769 | o | 1: f899f3910ce7 'B' | |
770 | |/ |
|
770 | |/ | |
771 | o 0: 4a2df7238c3b 'A' |
|
771 | o 0: 4a2df7238c3b 'A' | |
772 |
|
772 | |||
773 | $ hg rebase --continue |
|
773 | $ hg rebase --continue | |
774 | already rebased 1:f899f3910ce7 "B" (B) as 82b8abf9c185 |
|
774 | already rebased 1:f899f3910ce7 "B" (B) as 82b8abf9c185 | |
775 | already rebased 3:63668d570d21 "C" (C tip) as 82b8abf9c185 |
|
775 | already rebased 3:63668d570d21 "C" (C tip) as 82b8abf9c185 | |
776 | saved backup bundle to $TESTTMP/aborted-editor/.hg/strip-backup/f899f3910ce7-7cab5e15-rebase.hg |
|
776 | saved backup bundle to $TESTTMP/aborted-editor/.hg/strip-backup/f899f3910ce7-7cab5e15-rebase.hg |
General Comments 0
You need to be logged in to leave comments.
Login now