Mercurial > hg
comparison tests/test-rebase-named-branches.t @ 44923:1f114c797961 stable
rebase: avoid clobbering wdir() with --dry-run or --confirm (issue6291)
See 56d3e0b499df for the source of adding originalwd to the list of things that
cause wdir to be updated. That change didn't come with tests, and attempts to
recreate the scenario described have thus far failed.
Differential Revision: https://phab.mercurial-scm.org/D8489
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Thu, 30 Apr 2020 00:33:00 -0400 |
parents | 9f3aa0d3de41 |
children | f90a5c211251 |
comparison
equal
deleted
inserted
replaced
44922:9f3aa0d3de41 | 44923:1f114c797961 |
---|---|
337 +++ b/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 @@ | 338 @@ -1,1 +1,1 @@ |
339 -A | 339 -A |
340 +A-mod | 340 +A-mod |
341 | 341 |
342 BUG: This shouldn't affect wdir | 342 --dry-run doesn't affect a dirty working directory that is unrelated to the |
343 source or destination. | |
343 | 344 |
344 $ hg rebase -s tip -d 4 --dry-run | 345 $ hg rebase -s tip -d 4 --dry-run |
345 starting dry-run rebase; repository will not be changed | 346 starting dry-run rebase; repository will not be changed |
346 rebasing 11:be1dea60f2a6 "D" (tip) | 347 rebasing 11:be1dea60f2a6 "D" (tip) |
347 dry-run rebase completed successfully; run without -n/--dry-run to perform this rebase | 348 dry-run rebase completed successfully; run without -n/--dry-run to perform this rebase |
348 $ hg diff | 349 $ hg diff |
349 | 350 diff -r 2b586e70108d A |
350 BUG: This shouldn't affect wdir | 351 --- a/A Thu Jan 01 00:00:00 1970 +0000 |
352 +++ b/A Thu Jan 01 00:00:00 1970 +0000 | |
353 @@ -1,1 +1,1 @@ | |
354 -A | |
355 +A-mod | |
356 | |
357 Bailing out on --confirm doesn't affect a dirty working directory that is | |
358 unrelated to the source or destination. | |
351 | 359 |
352 $ echo A-mod > A | 360 $ echo A-mod > A |
353 $ echo n | hg rebase -s tip -d 4 --confirm --config ui.interactive=True | 361 $ echo n | hg rebase -s tip -d 4 --confirm --config ui.interactive=True |
354 starting in-memory rebase | 362 starting in-memory rebase |
355 rebasing 11:be1dea60f2a6 "D" (tip) | 363 rebasing 11:be1dea60f2a6 "D" (tip) |
356 rebase completed successfully | 364 rebase completed successfully |
357 apply changes (yn)? n | 365 apply changes (yn)? n |
358 $ hg diff | 366 $ hg diff |
367 diff -r 2b586e70108d A | |
368 --- a/A Thu Jan 01 00:00:00 1970 +0000 | |
369 +++ b/A Thu Jan 01 00:00:00 1970 +0000 | |
370 @@ -1,1 +1,1 @@ | |
371 -A | |
372 +A-mod | |
359 | 373 |
360 $ echo A-mod > A | 374 $ echo A-mod > A |
361 $ hg rebase -s tip -d 4 --confirm | 375 $ hg rebase -s tip -d 4 --confirm |
362 starting in-memory rebase | 376 starting in-memory rebase |
363 rebasing 11:be1dea60f2a6 "D" (tip) | 377 rebasing 11:be1dea60f2a6 "D" (tip) |