##// END OF EJS Templates
tests: simplify config in test-rebase-detach.t...
Martin von Zweigbergk -
r33559:09463429 default
parent child Browse files
Show More
@@ -1,417 +1,414
1 1 $ cat >> $HGRCPATH <<EOF
2 2 > [extensions]
3 3 > rebase=
4 4 >
5 > [phases]
6 > publish=False
7 >
8 5 > [alias]
9 > tglog = log -G --template "{rev}: '{desc}' {branches}\n"
6 > tglog = log -G --template "{rev}: '{desc}'\n"
10 7 > EOF
11 8
12 9
13 10 $ hg init a
14 11 $ cd a
15 12 $ hg unbundle "$TESTDIR/bundles/rebase.hg"
16 13 adding changesets
17 14 adding manifests
18 15 adding file changes
19 16 added 8 changesets with 7 changes to 7 files (+2 heads)
20 17 (run 'hg heads' to see heads, 'hg merge' to merge)
21 18 $ hg up tip
22 19 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
23 20
24 21 $ cd ..
25 22
26 23
27 24 Rebasing D onto H detaching from C:
28 25
29 26 $ hg clone -q -u . a a1
30 27 $ cd a1
31 28
32 29 $ hg tglog
33 30 @ 7: 'H'
34 31 |
35 32 | o 6: 'G'
36 33 |/|
37 34 o | 5: 'F'
38 35 | |
39 36 | o 4: 'E'
40 37 |/
41 38 | o 3: 'D'
42 39 | |
43 40 | o 2: 'C'
44 41 | |
45 42 | o 1: 'B'
46 43 |/
47 44 o 0: 'A'
48 45
49 46 $ hg phase --force --secret 3
50 47 $ hg rebase -s 3 -d 7
51 48 rebasing 3:32af7686d403 "D"
52 49 saved backup bundle to $TESTTMP/a1/.hg/strip-backup/32af7686d403-6f7dface-rebase.hg (glob)
53 50
54 51 $ hg log -G --template "{rev}:{phase} '{desc}' {branches}\n"
55 52 o 7:secret 'D'
56 53 |
57 54 @ 6:draft 'H'
58 55 |
59 56 | o 5:draft 'G'
60 57 |/|
61 58 o | 4:draft 'F'
62 59 | |
63 60 | o 3:draft 'E'
64 61 |/
65 62 | o 2:draft 'C'
66 63 | |
67 64 | o 1:draft 'B'
68 65 |/
69 66 o 0:draft 'A'
70 67
71 68 $ hg manifest --rev tip
72 69 A
73 70 D
74 71 F
75 72 H
76 73
77 74 $ cd ..
78 75
79 76
80 77 Rebasing C onto H detaching from B:
81 78
82 79 $ hg clone -q -u . a a2
83 80 $ cd a2
84 81
85 82 $ hg tglog
86 83 @ 7: 'H'
87 84 |
88 85 | o 6: 'G'
89 86 |/|
90 87 o | 5: 'F'
91 88 | |
92 89 | o 4: 'E'
93 90 |/
94 91 | o 3: 'D'
95 92 | |
96 93 | o 2: 'C'
97 94 | |
98 95 | o 1: 'B'
99 96 |/
100 97 o 0: 'A'
101 98
102 99 $ hg rebase -s 2 -d 7
103 100 rebasing 2:5fddd98957c8 "C"
104 101 rebasing 3:32af7686d403 "D"
105 102 saved backup bundle to $TESTTMP/a2/.hg/strip-backup/5fddd98957c8-f9244fa1-rebase.hg (glob)
106 103
107 104 $ hg tglog
108 105 o 7: 'D'
109 106 |
110 107 o 6: 'C'
111 108 |
112 109 @ 5: 'H'
113 110 |
114 111 | o 4: 'G'
115 112 |/|
116 113 o | 3: 'F'
117 114 | |
118 115 | o 2: 'E'
119 116 |/
120 117 | o 1: 'B'
121 118 |/
122 119 o 0: 'A'
123 120
124 121 $ hg manifest --rev tip
125 122 A
126 123 C
127 124 D
128 125 F
129 126 H
130 127
131 128 $ cd ..
132 129
133 130
134 131 Rebasing B onto H using detach (same as not using it):
135 132
136 133 $ hg clone -q -u . a a3
137 134 $ cd a3
138 135
139 136 $ hg tglog
140 137 @ 7: 'H'
141 138 |
142 139 | o 6: 'G'
143 140 |/|
144 141 o | 5: 'F'
145 142 | |
146 143 | o 4: 'E'
147 144 |/
148 145 | o 3: 'D'
149 146 | |
150 147 | o 2: 'C'
151 148 | |
152 149 | o 1: 'B'
153 150 |/
154 151 o 0: 'A'
155 152
156 153 $ hg rebase -s 1 -d 7
157 154 rebasing 1:42ccdea3bb16 "B"
158 155 rebasing 2:5fddd98957c8 "C"
159 156 rebasing 3:32af7686d403 "D"
160 157 saved backup bundle to $TESTTMP/a3/.hg/strip-backup/42ccdea3bb16-3cb021d3-rebase.hg (glob)
161 158
162 159 $ hg tglog
163 160 o 7: 'D'
164 161 |
165 162 o 6: 'C'
166 163 |
167 164 o 5: 'B'
168 165 |
169 166 @ 4: 'H'
170 167 |
171 168 | o 3: 'G'
172 169 |/|
173 170 o | 2: 'F'
174 171 | |
175 172 | o 1: 'E'
176 173 |/
177 174 o 0: 'A'
178 175
179 176 $ hg manifest --rev tip
180 177 A
181 178 B
182 179 C
183 180 D
184 181 F
185 182 H
186 183
187 184 $ cd ..
188 185
189 186
190 187 Rebasing C onto H detaching from B and collapsing:
191 188
192 189 $ hg clone -q -u . a a4
193 190 $ cd a4
194 191 $ hg phase --force --secret 3
195 192
196 193 $ hg tglog
197 194 @ 7: 'H'
198 195 |
199 196 | o 6: 'G'
200 197 |/|
201 198 o | 5: 'F'
202 199 | |
203 200 | o 4: 'E'
204 201 |/
205 202 | o 3: 'D'
206 203 | |
207 204 | o 2: 'C'
208 205 | |
209 206 | o 1: 'B'
210 207 |/
211 208 o 0: 'A'
212 209
213 210 $ hg rebase --collapse -s 2 -d 7
214 211 rebasing 2:5fddd98957c8 "C"
215 212 rebasing 3:32af7686d403 "D"
216 213 saved backup bundle to $TESTTMP/a4/.hg/strip-backup/5fddd98957c8-f9244fa1-rebase.hg (glob)
217 214
218 215 $ hg log -G --template "{rev}:{phase} '{desc}' {branches}\n"
219 216 o 6:secret 'Collapsed revision
220 217 | * C
221 218 | * D'
222 219 @ 5:draft 'H'
223 220 |
224 221 | o 4:draft 'G'
225 222 |/|
226 223 o | 3:draft 'F'
227 224 | |
228 225 | o 2:draft 'E'
229 226 |/
230 227 | o 1:draft 'B'
231 228 |/
232 229 o 0:draft 'A'
233 230
234 231 $ hg manifest --rev tip
235 232 A
236 233 C
237 234 D
238 235 F
239 236 H
240 237
241 238 $ cd ..
242 239
243 240 Rebasing across null as ancestor
244 241 $ hg clone -q -U a a5
245 242
246 243 $ cd a5
247 244
248 245 $ echo x > x
249 246
250 247 $ hg add x
251 248
252 249 $ hg ci -m "extra branch"
253 250 created new head
254 251
255 252 $ hg tglog
256 253 @ 8: 'extra branch'
257 254
258 255 o 7: 'H'
259 256 |
260 257 | o 6: 'G'
261 258 |/|
262 259 o | 5: 'F'
263 260 | |
264 261 | o 4: 'E'
265 262 |/
266 263 | o 3: 'D'
267 264 | |
268 265 | o 2: 'C'
269 266 | |
270 267 | o 1: 'B'
271 268 |/
272 269 o 0: 'A'
273 270
274 271 $ hg rebase -s 1 -d tip
275 272 rebasing 1:42ccdea3bb16 "B"
276 273 rebasing 2:5fddd98957c8 "C"
277 274 rebasing 3:32af7686d403 "D"
278 275 saved backup bundle to $TESTTMP/a5/.hg/strip-backup/42ccdea3bb16-3cb021d3-rebase.hg (glob)
279 276
280 277 $ hg tglog
281 278 o 8: 'D'
282 279 |
283 280 o 7: 'C'
284 281 |
285 282 o 6: 'B'
286 283 |
287 284 @ 5: 'extra branch'
288 285
289 286 o 4: 'H'
290 287 |
291 288 | o 3: 'G'
292 289 |/|
293 290 o | 2: 'F'
294 291 | |
295 292 | o 1: 'E'
296 293 |/
297 294 o 0: 'A'
298 295
299 296
300 297 $ hg rebase -d 5 -s 7
301 298 rebasing 7:13547172c9c0 "C"
302 299 rebasing 8:4e27a76c371a "D" (tip)
303 300 saved backup bundle to $TESTTMP/a5/.hg/strip-backup/13547172c9c0-35685ded-rebase.hg (glob)
304 301 $ hg tglog
305 302 o 8: 'D'
306 303 |
307 304 o 7: 'C'
308 305 |
309 306 | o 6: 'B'
310 307 |/
311 308 @ 5: 'extra branch'
312 309
313 310 o 4: 'H'
314 311 |
315 312 | o 3: 'G'
316 313 |/|
317 314 o | 2: 'F'
318 315 | |
319 316 | o 1: 'E'
320 317 |/
321 318 o 0: 'A'
322 319
323 320 $ cd ..
324 321
325 322 Verify that target is not selected as external rev (issue3085)
326 323
327 324 $ hg clone -q -U a a6
328 325 $ cd a6
329 326 $ hg up -q 6
330 327
331 328 $ echo "I" >> E
332 329 $ hg ci -m "I"
333 330 $ hg merge 7
334 331 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
335 332 (branch merge, don't forget to commit)
336 333 $ hg ci -m "Merge"
337 334 $ echo "J" >> F
338 335 $ hg ci -m "J"
339 336
340 337 $ hg rebase -s 8 -d 7 --collapse --config ui.merge=internal:other
341 338 rebasing 8:9790e768172d "I"
342 339 rebasing 9:5d7b11f5fb97 "Merge"
343 340 rebasing 10:9427d4d5af81 "J" (tip)
344 341 saved backup bundle to $TESTTMP/a6/.hg/strip-backup/9790e768172d-c2111e9d-rebase.hg (glob)
345 342
346 343 $ hg tglog
347 344 @ 8: 'Collapsed revision
348 345 | * I
349 346 | * Merge
350 347 | * J'
351 348 o 7: 'H'
352 349 |
353 350 | o 6: 'G'
354 351 |/|
355 352 o | 5: 'F'
356 353 | |
357 354 | o 4: 'E'
358 355 |/
359 356 | o 3: 'D'
360 357 | |
361 358 | o 2: 'C'
362 359 | |
363 360 | o 1: 'B'
364 361 |/
365 362 o 0: 'A'
366 363
367 364
368 365 $ hg log --rev tip
369 366 changeset: 8:9472f4b1d736
370 367 tag: tip
371 368 user: test
372 369 date: Thu Jan 01 00:00:00 1970 +0000
373 370 summary: Collapsed revision
374 371
375 372
376 373 $ cd ..
377 374
378 375 Ensure --continue restores a correct state (issue3046) and phase:
379 376 $ hg clone -q a a7
380 377 $ cd a7
381 378 $ hg up -q 3
382 379 $ echo 'H2' > H
383 380 $ hg ci -A -m 'H2'
384 381 adding H
385 382 $ hg phase --force --secret 8
386 383 $ hg rebase -s 8 -d 7 --config ui.merge=internal:fail
387 384 rebasing 8:6215fafa5447 "H2" (tip)
388 385 merging H
389 386 warning: conflicts while merging H! (edit, then use 'hg resolve --mark')
390 387 unresolved conflicts (see hg resolve, then hg rebase --continue)
391 388 [1]
392 389 $ hg resolve --all -t internal:local
393 390 (no more unresolved files)
394 391 continue: hg rebase --continue
395 392 $ hg rebase -c
396 393 rebasing 8:6215fafa5447 "H2" (tip)
397 394 note: rebase of 8:6215fafa5447 created no changes to commit
398 395 saved backup bundle to $TESTTMP/a7/.hg/strip-backup/6215fafa5447-5804ebd5-rebase.hg (glob)
399 396 $ hg log -G --template "{rev}:{phase} '{desc}' {branches}\n"
400 397 @ 7:draft 'H'
401 398 |
402 399 | o 6:draft 'G'
403 400 |/|
404 401 o | 5:draft 'F'
405 402 | |
406 403 | o 4:draft 'E'
407 404 |/
408 405 | o 3:draft 'D'
409 406 | |
410 407 | o 2:draft 'C'
411 408 | |
412 409 | o 1:draft 'B'
413 410 |/
414 411 o 0:draft 'A'
415 412
416 413
417 414 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now