Mercurial > hg
diff 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 |
line wrap: on
line diff
--- a/tests/test-rebase-named-branches.t Thu Apr 30 00:12:11 2020 -0400 +++ b/tests/test-rebase-named-branches.t Thu Apr 30 00:33:00 2020 -0400 @@ -339,15 +339,23 @@ -A +A-mod -BUG: This shouldn't affect wdir +--dry-run doesn't affect a dirty working directory that is unrelated to the +source or destination. $ hg rebase -s tip -d 4 --dry-run starting dry-run rebase; repository will not be changed rebasing 11:be1dea60f2a6 "D" (tip) dry-run rebase completed successfully; run without -n/--dry-run to perform this rebase $ hg diff + diff -r 2b586e70108d A + --- a/A Thu Jan 01 00:00:00 1970 +0000 + +++ b/A Thu Jan 01 00:00:00 1970 +0000 + @@ -1,1 +1,1 @@ + -A + +A-mod -BUG: This shouldn't affect wdir +Bailing out on --confirm doesn't affect a dirty working directory that is +unrelated to the source or destination. $ echo A-mod > A $ echo n | hg rebase -s tip -d 4 --confirm --config ui.interactive=True @@ -356,6 +364,12 @@ rebase completed successfully apply changes (yn)? n $ hg diff + diff -r 2b586e70108d A + --- a/A Thu Jan 01 00:00:00 1970 +0000 + +++ b/A Thu Jan 01 00:00:00 1970 +0000 + @@ -1,1 +1,1 @@ + -A + +A-mod $ echo A-mod > A $ hg rebase -s tip -d 4 --confirm