This is an archive of the discontinued Mercurial Phabricator instance.

rebase: avoid clobbering wdir() with --dry-run or --confirm (issue6291)
ClosedPublic

Authored by mharbison72 on Apr 30 2020, 1:20 AM.

Details

Summary

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.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

mharbison72 created this revision.Apr 30 2020, 1:20 AM

I'm not real familiar with how rebase works, and seems like it's pretty intricate code. I'd also feel better if there were tests for the original commit referenced. But it's very unlikely that I'll have any time before the weekend to look at this again, so I thought I'd send it out now. Maybe it's narrow enough or maybe somebody can backfill the tests, and we can avoid a known data shredder in the next release.

durin42 accepted this revision as: durin42.

Seems fine to me, but I want one of @martinvonz or @marmoute to look at this.

martinvonz added inline comments.May 16 2020, 2:04 AM
tests/test-rebase-named-branches.t
342–344

It seems to me that it also shouldn't affect a dirty working directory that is *related* to the source or destination. Right?

mharbison72 added inline comments.May 16 2020, 12:08 PM
tests/test-rebase-named-branches.t
342–344

56d3e0b499df seems to imply "yes", unless I'm either misunderstanding or your recent cleanups around rebases in progress changed that.

This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.