This is an archive of the discontinued Mercurial Phabricator instance.

rebase: abort if the user tries to rebase the working copy
ClosedPublic

Authored by martinvonz on Jan 31 2020, 1:59 PM.

Details

Summary

I think it's more correct to treat hg rebase -r 'wdirrev()' -d foo
as hg co -m foo, but I'm instead making it error out. That's partly
because it's probably what the user wanted (in the case I heard from a
user, they had done hg rebase -s f where f resolved to wdir())
and partly because I don't want to think about more complicated cases
where the user specifies the working copy together with other commits.

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

martinvonz created this revision.Jan 31 2020, 1:59 PM
pulkit added a subscriber: pulkit.Jan 31 2020, 6:28 PM
pulkit added inline comments.
tests/test-rebase-parameters.t
100

hm, the destination is not empty here.

martinvonz updated this revision to Diff 19804.Jan 31 2020, 7:08 PM
martinvonz added inline comments.Jan 31 2020, 7:08 PM
tests/test-rebase-parameters.t
100

Oops, that was sloppy of me to not notice (I just assumed it was the same message as above). Will fix.

pulkit accepted this revision.Feb 3 2020, 8:19 AM
This revision is now accepted and ready to land.Feb 3 2020, 8:19 AM