##// END OF EJS Templates
test: use the "correct" merge tool in `test-rebase-detach.t`...
Boris Feld -
r40502:b57f2734 default
parent child Browse files
Show More
@@ -1,317 +1,317 b''
1 $ cat >> $HGRCPATH <<EOF
1 $ cat >> $HGRCPATH <<EOF
2 > [extensions]
2 > [extensions]
3 > rebase=
3 > rebase=
4 >
4 >
5 > [alias]
5 > [alias]
6 > tglog = log -G --template "{rev}: {node|short} '{desc}'\n"
6 > tglog = log -G --template "{rev}: {node|short} '{desc}'\n"
7 >
7 >
8 > [extensions]
8 > [extensions]
9 > drawdag=$TESTDIR/drawdag.py
9 > drawdag=$TESTDIR/drawdag.py
10 > EOF
10 > EOF
11
11
12 Rebasing D onto B detaching from C (one commit):
12 Rebasing D onto B detaching from C (one commit):
13
13
14 $ hg init a1
14 $ hg init a1
15 $ cd a1
15 $ cd a1
16
16
17 $ hg debugdrawdag <<EOF
17 $ hg debugdrawdag <<EOF
18 > D
18 > D
19 > |
19 > |
20 > C B
20 > C B
21 > |/
21 > |/
22 > A
22 > A
23 > EOF
23 > EOF
24 $ hg phase --force --secret D
24 $ hg phase --force --secret D
25
25
26 $ hg rebase -s D -d B
26 $ hg rebase -s D -d B
27 rebasing 3:e7b3f00ed42e "D" (D tip)
27 rebasing 3:e7b3f00ed42e "D" (D tip)
28 saved backup bundle to $TESTTMP/a1/.hg/strip-backup/e7b3f00ed42e-6f368371-rebase.hg
28 saved backup bundle to $TESTTMP/a1/.hg/strip-backup/e7b3f00ed42e-6f368371-rebase.hg
29
29
30 $ hg log -G --template "{rev}:{phase} '{desc}' {branches}\n"
30 $ hg log -G --template "{rev}:{phase} '{desc}' {branches}\n"
31 o 3:secret 'D'
31 o 3:secret 'D'
32 |
32 |
33 | o 2:draft 'C'
33 | o 2:draft 'C'
34 | |
34 | |
35 o | 1:draft 'B'
35 o | 1:draft 'B'
36 |/
36 |/
37 o 0:draft 'A'
37 o 0:draft 'A'
38
38
39 $ hg manifest --rev tip
39 $ hg manifest --rev tip
40 A
40 A
41 B
41 B
42 D
42 D
43
43
44 $ cd ..
44 $ cd ..
45
45
46
46
47 Rebasing D onto B detaching from C (two commits):
47 Rebasing D onto B detaching from C (two commits):
48
48
49 $ hg init a2
49 $ hg init a2
50 $ cd a2
50 $ cd a2
51
51
52 $ hg debugdrawdag <<EOF
52 $ hg debugdrawdag <<EOF
53 > E
53 > E
54 > |
54 > |
55 > D
55 > D
56 > |
56 > |
57 > C B
57 > C B
58 > |/
58 > |/
59 > A
59 > A
60 > EOF
60 > EOF
61
61
62 $ hg rebase -s D -d B
62 $ hg rebase -s D -d B
63 rebasing 3:e7b3f00ed42e "D" (D)
63 rebasing 3:e7b3f00ed42e "D" (D)
64 rebasing 4:69a34c08022a "E" (E tip)
64 rebasing 4:69a34c08022a "E" (E tip)
65 saved backup bundle to $TESTTMP/a2/.hg/strip-backup/e7b3f00ed42e-a2ec7cea-rebase.hg
65 saved backup bundle to $TESTTMP/a2/.hg/strip-backup/e7b3f00ed42e-a2ec7cea-rebase.hg
66
66
67 $ hg tglog
67 $ hg tglog
68 o 4: ee79e0744528 'E'
68 o 4: ee79e0744528 'E'
69 |
69 |
70 o 3: 10530e1d72d9 'D'
70 o 3: 10530e1d72d9 'D'
71 |
71 |
72 | o 2: dc0947a82db8 'C'
72 | o 2: dc0947a82db8 'C'
73 | |
73 | |
74 o | 1: 112478962961 'B'
74 o | 1: 112478962961 'B'
75 |/
75 |/
76 o 0: 426bada5c675 'A'
76 o 0: 426bada5c675 'A'
77
77
78 $ hg manifest --rev tip
78 $ hg manifest --rev tip
79 A
79 A
80 B
80 B
81 D
81 D
82 E
82 E
83
83
84 $ cd ..
84 $ cd ..
85
85
86 Rebasing C onto B using detach (same as not using it):
86 Rebasing C onto B using detach (same as not using it):
87
87
88 $ hg init a3
88 $ hg init a3
89 $ cd a3
89 $ cd a3
90
90
91 $ hg debugdrawdag <<EOF
91 $ hg debugdrawdag <<EOF
92 > D
92 > D
93 > |
93 > |
94 > C B
94 > C B
95 > |/
95 > |/
96 > A
96 > A
97 > EOF
97 > EOF
98
98
99 $ hg rebase -s C -d B
99 $ hg rebase -s C -d B
100 rebasing 2:dc0947a82db8 "C" (C)
100 rebasing 2:dc0947a82db8 "C" (C)
101 rebasing 3:e7b3f00ed42e "D" (D tip)
101 rebasing 3:e7b3f00ed42e "D" (D tip)
102 saved backup bundle to $TESTTMP/a3/.hg/strip-backup/dc0947a82db8-b8481714-rebase.hg
102 saved backup bundle to $TESTTMP/a3/.hg/strip-backup/dc0947a82db8-b8481714-rebase.hg
103
103
104 $ hg tglog
104 $ hg tglog
105 o 3: 7375f3dbfb0f 'D'
105 o 3: 7375f3dbfb0f 'D'
106 |
106 |
107 o 2: bbfdd6cb49aa 'C'
107 o 2: bbfdd6cb49aa 'C'
108 |
108 |
109 o 1: 112478962961 'B'
109 o 1: 112478962961 'B'
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 D
117 D
118
118
119 $ cd ..
119 $ cd ..
120
120
121
121
122 Rebasing D onto B detaching from C and collapsing:
122 Rebasing D onto B detaching from C and collapsing:
123
123
124 $ hg init a4
124 $ hg init a4
125 $ cd a4
125 $ cd a4
126
126
127 $ hg debugdrawdag <<EOF
127 $ hg debugdrawdag <<EOF
128 > E
128 > E
129 > |
129 > |
130 > D
130 > D
131 > |
131 > |
132 > C B
132 > C B
133 > |/
133 > |/
134 > A
134 > A
135 > EOF
135 > EOF
136 $ hg phase --force --secret E
136 $ hg phase --force --secret E
137
137
138 $ hg rebase --collapse -s D -d B
138 $ hg rebase --collapse -s D -d B
139 rebasing 3:e7b3f00ed42e "D" (D)
139 rebasing 3:e7b3f00ed42e "D" (D)
140 rebasing 4:69a34c08022a "E" (E tip)
140 rebasing 4:69a34c08022a "E" (E tip)
141 saved backup bundle to $TESTTMP/a4/.hg/strip-backup/e7b3f00ed42e-a2ec7cea-rebase.hg
141 saved backup bundle to $TESTTMP/a4/.hg/strip-backup/e7b3f00ed42e-a2ec7cea-rebase.hg
142
142
143 $ hg log -G --template "{rev}:{phase} '{desc}' {branches}\n"
143 $ hg log -G --template "{rev}:{phase} '{desc}' {branches}\n"
144 o 3:secret 'Collapsed revision
144 o 3:secret 'Collapsed revision
145 | * D
145 | * D
146 | * E'
146 | * E'
147 | o 2:draft 'C'
147 | o 2:draft 'C'
148 | |
148 | |
149 o | 1:draft 'B'
149 o | 1:draft 'B'
150 |/
150 |/
151 o 0:draft 'A'
151 o 0:draft 'A'
152
152
153 $ hg manifest --rev tip
153 $ hg manifest --rev tip
154 A
154 A
155 B
155 B
156 D
156 D
157 E
157 E
158
158
159 $ cd ..
159 $ cd ..
160
160
161 Rebasing across null as ancestor
161 Rebasing across null as ancestor
162 $ hg init a5
162 $ hg init a5
163 $ cd a5
163 $ cd a5
164
164
165 $ hg debugdrawdag <<EOF
165 $ hg debugdrawdag <<EOF
166 > E
166 > E
167 > |
167 > |
168 > D
168 > D
169 > |
169 > |
170 > C
170 > C
171 > |
171 > |
172 > A B
172 > A B
173 > EOF
173 > EOF
174
174
175 $ hg rebase -s C -d B
175 $ hg rebase -s C -d B
176 rebasing 2:dc0947a82db8 "C" (C)
176 rebasing 2:dc0947a82db8 "C" (C)
177 rebasing 3:e7b3f00ed42e "D" (D)
177 rebasing 3:e7b3f00ed42e "D" (D)
178 rebasing 4:69a34c08022a "E" (E tip)
178 rebasing 4:69a34c08022a "E" (E tip)
179 saved backup bundle to $TESTTMP/a5/.hg/strip-backup/dc0947a82db8-3eefec98-rebase.hg
179 saved backup bundle to $TESTTMP/a5/.hg/strip-backup/dc0947a82db8-3eefec98-rebase.hg
180
180
181 $ hg tglog
181 $ hg tglog
182 o 4: e3d0c70d606d 'E'
182 o 4: e3d0c70d606d 'E'
183 |
183 |
184 o 3: e9153d36a1af 'D'
184 o 3: e9153d36a1af 'D'
185 |
185 |
186 o 2: a7ac28b870a8 'C'
186 o 2: a7ac28b870a8 'C'
187 |
187 |
188 o 1: fc2b737bb2e5 'B'
188 o 1: fc2b737bb2e5 'B'
189
189
190 o 0: 426bada5c675 'A'
190 o 0: 426bada5c675 'A'
191
191
192 $ hg rebase -d 1 -s 3
192 $ hg rebase -d 1 -s 3
193 rebasing 3:e9153d36a1af "D"
193 rebasing 3:e9153d36a1af "D"
194 rebasing 4:e3d0c70d606d "E" (tip)
194 rebasing 4:e3d0c70d606d "E" (tip)
195 saved backup bundle to $TESTTMP/a5/.hg/strip-backup/e9153d36a1af-db7388ed-rebase.hg
195 saved backup bundle to $TESTTMP/a5/.hg/strip-backup/e9153d36a1af-db7388ed-rebase.hg
196 $ hg tglog
196 $ hg tglog
197 o 4: 2c24e540eccd 'E'
197 o 4: 2c24e540eccd 'E'
198 |
198 |
199 o 3: 73f786ed52ff 'D'
199 o 3: 73f786ed52ff 'D'
200 |
200 |
201 | o 2: a7ac28b870a8 'C'
201 | o 2: a7ac28b870a8 'C'
202 |/
202 |/
203 o 1: fc2b737bb2e5 'B'
203 o 1: fc2b737bb2e5 'B'
204
204
205 o 0: 426bada5c675 'A'
205 o 0: 426bada5c675 'A'
206
206
207 $ cd ..
207 $ cd ..
208
208
209 Verify that target is not selected as external rev (issue3085)
209 Verify that target is not selected as external rev (issue3085)
210
210
211 $ hg init a6
211 $ hg init a6
212 $ cd a6
212 $ cd a6
213
213
214 $ hg debugdrawdag <<EOF
214 $ hg debugdrawdag <<EOF
215 > H
215 > H
216 > | G
216 > | G
217 > |/|
217 > |/|
218 > F E
218 > F E
219 > |/
219 > |/
220 > A
220 > A
221 > EOF
221 > EOF
222 $ hg up -q G
222 $ hg up -q G
223
223
224 $ echo "I" >> E
224 $ echo "I" >> E
225 $ hg ci -m "I"
225 $ hg ci -m "I"
226 $ hg tag --local I
226 $ hg tag --local I
227 $ hg merge H
227 $ hg merge H
228 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
228 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
229 (branch merge, don't forget to commit)
229 (branch merge, don't forget to commit)
230 $ hg ci -m "Merge"
230 $ hg ci -m "Merge"
231 $ echo "J" >> F
231 $ echo "J" >> F
232 $ hg ci -m "J"
232 $ hg ci -m "J"
233 $ hg tglog
233 $ hg tglog
234 @ 7: c6aaf0d259c0 'J'
234 @ 7: c6aaf0d259c0 'J'
235 |
235 |
236 o 6: 0cfbc7e8faaf 'Merge'
236 o 6: 0cfbc7e8faaf 'Merge'
237 |\
237 |\
238 | o 5: b92d164ad3cb 'I'
238 | o 5: b92d164ad3cb 'I'
239 | |
239 | |
240 o | 4: 4ea5b230dea3 'H'
240 o | 4: 4ea5b230dea3 'H'
241 | |
241 | |
242 | o 3: c6001eacfde5 'G'
242 | o 3: c6001eacfde5 'G'
243 |/|
243 |/|
244 o | 2: 8908a377a434 'F'
244 o | 2: 8908a377a434 'F'
245 | |
245 | |
246 | o 1: 7fb047a69f22 'E'
246 | o 1: 7fb047a69f22 'E'
247 |/
247 |/
248 o 0: 426bada5c675 'A'
248 o 0: 426bada5c675 'A'
249
249
250 $ hg rebase -s I -d H --collapse --config ui.merge=internal:other
250 $ hg rebase -s I -d H --collapse --config ui.merge=internal:other
251 rebasing 5:b92d164ad3cb "I" (I)
251 rebasing 5:b92d164ad3cb "I" (I)
252 rebasing 6:0cfbc7e8faaf "Merge"
252 rebasing 6:0cfbc7e8faaf "Merge"
253 rebasing 7:c6aaf0d259c0 "J" (tip)
253 rebasing 7:c6aaf0d259c0 "J" (tip)
254 saved backup bundle to $TESTTMP/a6/.hg/strip-backup/b92d164ad3cb-88fd7ab7-rebase.hg
254 saved backup bundle to $TESTTMP/a6/.hg/strip-backup/b92d164ad3cb-88fd7ab7-rebase.hg
255
255
256 $ hg tglog
256 $ hg tglog
257 @ 5: 65079693dac4 'Collapsed revision
257 @ 5: 65079693dac4 'Collapsed revision
258 | * I
258 | * I
259 | * Merge
259 | * Merge
260 | * J'
260 | * J'
261 o 4: 4ea5b230dea3 'H'
261 o 4: 4ea5b230dea3 'H'
262 |
262 |
263 | o 3: c6001eacfde5 'G'
263 | o 3: c6001eacfde5 'G'
264 |/|
264 |/|
265 o | 2: 8908a377a434 'F'
265 o | 2: 8908a377a434 'F'
266 | |
266 | |
267 | o 1: 7fb047a69f22 'E'
267 | o 1: 7fb047a69f22 'E'
268 |/
268 |/
269 o 0: 426bada5c675 'A'
269 o 0: 426bada5c675 'A'
270
270
271
271
272 $ hg log --rev tip
272 $ hg log --rev tip
273 changeset: 5:65079693dac4
273 changeset: 5:65079693dac4
274 tag: tip
274 tag: tip
275 user: test
275 user: test
276 date: Thu Jan 01 00:00:00 1970 +0000
276 date: Thu Jan 01 00:00:00 1970 +0000
277 summary: Collapsed revision
277 summary: Collapsed revision
278
278
279
279
280 $ cd ..
280 $ cd ..
281
281
282 Ensure --continue restores a correct state (issue3046) and phase:
282 Ensure --continue restores a correct state (issue3046) and phase:
283 $ hg init a7
283 $ hg init a7
284 $ cd a7
284 $ cd a7
285
285
286 $ hg debugdrawdag <<EOF
286 $ hg debugdrawdag <<EOF
287 > C B
287 > C B
288 > |/
288 > |/
289 > A
289 > A
290 > EOF
290 > EOF
291 $ hg up -q C
291 $ hg up -q C
292 $ echo 'B2' > B
292 $ echo 'B2' > B
293 $ hg ci -A -m 'B2'
293 $ hg ci -A -m 'B2'
294 adding B
294 adding B
295 $ hg phase --force --secret .
295 $ hg phase --force --secret .
296 $ hg rebase -s . -d B --config ui.merge=internal:fail
296 $ hg rebase -s . -d B --config ui.merge=internal:merge
297 rebasing 3:17b4880d2402 "B2" (tip)
297 rebasing 3:17b4880d2402 "B2" (tip)
298 merging B
298 merging B
299 warning: conflicts while merging B! (edit, then use 'hg resolve --mark')
299 warning: conflicts while merging B! (edit, then use 'hg resolve --mark')
300 unresolved conflicts (see hg resolve, then hg rebase --continue)
300 unresolved conflicts (see hg resolve, then hg rebase --continue)
301 [1]
301 [1]
302 $ hg resolve --all -t internal:local
302 $ hg resolve --all -t internal:local
303 (no more unresolved files)
303 (no more unresolved files)
304 continue: hg rebase --continue
304 continue: hg rebase --continue
305 $ hg rebase -c
305 $ hg rebase -c
306 rebasing 3:17b4880d2402 "B2" (tip)
306 rebasing 3:17b4880d2402 "B2" (tip)
307 note: rebase of 3:17b4880d2402 created no changes to commit
307 note: rebase of 3:17b4880d2402 created no changes to commit
308 saved backup bundle to $TESTTMP/a7/.hg/strip-backup/17b4880d2402-1ae1f6cc-rebase.hg
308 saved backup bundle to $TESTTMP/a7/.hg/strip-backup/17b4880d2402-1ae1f6cc-rebase.hg
309 $ hg log -G --template "{rev}:{phase} '{desc}' {branches}\n"
309 $ hg log -G --template "{rev}:{phase} '{desc}' {branches}\n"
310 o 2:draft 'C'
310 o 2:draft 'C'
311 |
311 |
312 | @ 1:draft 'B'
312 | @ 1:draft 'B'
313 |/
313 |/
314 o 0:draft 'A'
314 o 0:draft 'A'
315
315
316
316
317 $ cd ..
317 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now