Page MenuHomePhabricator

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

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



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

rHG Mercurial
Automatic diff as part of commit; lint not applicable.
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.

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

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