Bug 6291 - rebase --dry-run silently cleans a dirty working directory
Summary: rebase --dry-run silently cleans a dirty working directory
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: rebase (show other bugs)
Version: 5.3
Hardware: All All
: wish bug
Assignee: Bugzilla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-21 23:53 UTC by Matt Harbison
Modified: 2020-06-13 00:01 UTC (History)
1 user (show)

See Also:
Python Version: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Harbison 2020-03-21 23:53 UTC
I had a few changes left over with default checked out, and ran this sequence with 5.3.1:

$ hg rebase -s 45368 -d stable
abort: uncommitted changes

$ hg diff
diff --git a/tests/test-phabricator.t b/tests/test-phabricator.t
--- a/tests/test-phabricator.t
+++ b/tests/test-phabricator.t
...

$ hg rebase -s 45368 -d stable --dry-run
starting dry-run rebase; repository will not be changed
rebasing 45368:f7b61b78584e "xxx-doc: fix typos in upgrade and revlog"
dry-run rebase completed successfully; run without -n/--dry-run to perform this rebase

$ hg diff

$ hg st

There was a noticeable pause after the suggestion to run without -n, so that may have been when it happened.
Comment 1 Matt Harbison 2020-03-22 00:49 UTC
It looks like `--confirm` also has the problem when answering 'no', but leaves wdir untouched if answering 'yes'.
Comment 2 Bugzilla 2020-04-22 00:01 UTC
Bug was set to UNCONFIRMED for 30 days, bumping
Comment 3 Bugzilla 2020-05-22 00:02 UTC
Bug was set to UNCONFIRMED for 30 days, bumping
Comment 4 HG Bot 2020-06-05 23:40 UTC
Fixed by https://mercurial-scm.org/repo/hg/rev/1f114c797961
Matt Harbison <matt_harbison@yahoo.com>
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

(please test the fix)
Comment 5 Bugzilla 2020-06-13 00:01 UTC
Bug was set to TESTING for 7 days, resolving