##// END OF EJS Templates
tests: show that rebase --dry-run and --confirm wipeout uncommitted changes...
Matt Harbison -
r45457:9f3aa0d3 stable
parent child Browse files
Show More
@@ -293,6 +293,125 b' Reopen branch by rebase'
293 rebasing 9:e522577ccdbd "D"
293 rebasing 9:e522577ccdbd "D"
294 saved backup bundle to $TESTTMP/a1/.hg/strip-backup/8e279d293175-b023e27c-rebase.hg
294 saved backup bundle to $TESTTMP/a1/.hg/strip-backup/8e279d293175-b023e27c-rebase.hg
295
295
296 $ hg log -G -Tcompact
297 o 11[tip] be1dea60f2a6 2011-04-30 15:24 +0200 nicdumz
298 | D
299 |
300 o 10 ac34ce92632a 2011-04-30 15:24 +0200 nicdumz
301 | C
302 |
303 o 9 7bd665b6ce12 2011-04-30 15:24 +0200 nicdumz
304 | B
305 |
306 o 8 58e7c36e77f7 1970-01-01 00:00 +0000 test
307 | dev-two named branch
308 |
309 o 7 8e5a320651f3 2011-04-30 15:24 +0200 nicdumz
310 | H
311 |
312 @ 6 2b586e70108d 1970-01-01 00:00 +0000 test
313 | close b
314 |
315 o 5:3 3f9d5df8a707 1970-01-01 00:00 +0000 test
316 | create b
317 |
318 | o 4:3,1 aeefee77ab01 2011-04-30 15:24 +0200 nicdumz
319 |/| G
320 | |
321 o | 3 e908b85f3729 2011-04-30 15:24 +0200 nicdumz
322 | | F
323 | |
324 o | 2:0 bc8139ee757c 1970-01-01 00:00 +0000 test
325 | | dev-one named branch
326 | |
327 | o 1 9520eea781bc 2011-04-30 15:24 +0200 nicdumz
328 |/ E
329 |
330 o 0 cd010b8cd998 2011-04-30 15:24 +0200 nicdumz
331 A
332
333 $ echo A-mod > A
334 $ hg diff
335 diff -r 2b586e70108d A
336 --- a/A Thu Jan 01 00:00:00 1970 +0000
337 +++ b/A Thu Jan 01 00:00:00 1970 +0000
338 @@ -1,1 +1,1 @@
339 -A
340 +A-mod
341
342 BUG: This shouldn't affect wdir
343
344 $ hg rebase -s tip -d 4 --dry-run
345 starting dry-run rebase; repository will not be changed
346 rebasing 11:be1dea60f2a6 "D" (tip)
347 dry-run rebase completed successfully; run without -n/--dry-run to perform this rebase
348 $ hg diff
349
350 BUG: This shouldn't affect wdir
351
352 $ echo A-mod > A
353 $ echo n | hg rebase -s tip -d 4 --confirm --config ui.interactive=True
354 starting in-memory rebase
355 rebasing 11:be1dea60f2a6 "D" (tip)
356 rebase completed successfully
357 apply changes (yn)? n
358 $ hg diff
359
360 $ echo A-mod > A
361 $ hg rebase -s tip -d 4 --confirm
362 starting in-memory rebase
363 rebasing 11:be1dea60f2a6 "D" (tip)
364 rebase completed successfully
365 apply changes (yn)? y
366 saved backup bundle to $TESTTMP/a1/.hg/strip-backup/be1dea60f2a6-ca6d2dac-rebase.hg
367 $ hg diff
368 diff -r 2b586e70108d A
369 --- a/A Thu Jan 01 00:00:00 1970 +0000
370 +++ b/A Thu Jan 01 00:00:00 1970 +0000
371 @@ -1,1 +1,1 @@
372 -A
373 +A-mod
374
375 Attempting to rebase the parent of a dirty working directory will abort, without
376 mangling the working directory...
377
378 $ hg rebase -s 5 -d 4 --dry-run
379 starting dry-run rebase; repository will not be changed
380 abort: uncommitted changes
381 [255]
382 $ hg diff
383 diff -r 2b586e70108d A
384 --- a/A Thu Jan 01 00:00:00 1970 +0000
385 +++ b/A Thu Jan 01 00:00:00 1970 +0000
386 @@ -1,1 +1,1 @@
387 -A
388 +A-mod
389
390 ... ditto for --confirm
391
392 $ echo n | hg rebase -s 5 -d 4 --confirm --config ui.interactive=True
393 starting in-memory rebase
394 abort: uncommitted changes
395 [255]
396 $ hg diff
397 diff -r 2b586e70108d A
398 --- a/A Thu Jan 01 00:00:00 1970 +0000
399 +++ b/A Thu Jan 01 00:00:00 1970 +0000
400 @@ -1,1 +1,1 @@
401 -A
402 +A-mod
403 $ hg rebase -s 5 -d 4 --confirm
404 starting in-memory rebase
405 abort: uncommitted changes
406 [255]
407 $ hg diff
408 diff -r 2b586e70108d A
409 --- a/A Thu Jan 01 00:00:00 1970 +0000
410 +++ b/A Thu Jan 01 00:00:00 1970 +0000
411 @@ -1,1 +1,1 @@
412 -A
413 +A-mod
414
296 $ cd ..
415 $ cd ..
297
416
298 Rebase to other head on branch
417 Rebase to other head on branch
General Comments 0
You need to be logged in to leave comments. Login now