Page MenuHomePhabricator

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

Authored by martinvonz on Fri, Jan 31, 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.Fri, Jan 31, 1:59 PM
pulkit added a subscriber: pulkit.Fri, Jan 31, 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.Fri, Jan 31, 7:08 PM
martinvonz added inline comments.Fri, Jan 31, 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.Mon, Feb 3, 8:19 AM
This revision is now accepted and ready to land.Mon, Feb 3, 8:19 AM