Page MenuHomePhabricator

resolve: add a --clear option for clearing the merge state
Changes PlannedPublic

Authored by martinvonz on Mar 13 2020, 5:20 PM.

Details

Reviewers
None
Group Reviewers
hg-reviewers
Summary

E.g. after running hg co -m and resolving merge conflicts, the merge
state will still exist. That can be seen when running hg resolve -l
or hg status -v (a.k.a. morestatus). There's currently no good way
of clearing it (hg co -C . works, but is not an option if you have a
dirty working copy). This patch adds hg resolve --clear specifically
for clearing the merge state.

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

martinvonz created this revision.Mar 13 2020, 5:20 PM
martinvonz edited the summary of this revision. (Show Details)Mar 17 2020, 6:05 PM
martinvonz updated this revision to Diff 20820.
pulkit added a subscriber: pulkit.Mar 19 2020, 4:30 AM

I like the idea. IIRC, Ryan from FB hit similar issues in a sprint some years ago and came up with hg up --finish or something like that.

Maybe we should not let user clear the mergestate and suggest continue/<cmd-name> --continue if it's not result of update command. Thoughts?

I like the idea. IIRC, Ryan from FB hit similar issues in a sprint some years ago and came up with hg up --finish or something like that.
Maybe we should not let user clear the mergestate and suggest continue/<cmd-name> --continue if it's not result of update command. Thoughts?

Ho, that's a good idea. It looks like hg update --merge is the only command that do not have --continue support. So instead of adding a whole new flag and action to this exception, removing the exception seems like a better move. What do you think @martinvonz ?

martinvonz planned changes to this revision.Mar 19 2020, 7:55 PM

I like the idea. IIRC, Ryan from FB hit similar issues in a sprint some years ago and came up with hg up --finish or something like that.
Maybe we should not let user clear the mergestate and suggest continue/<cmd-name> --continue if it's not result of update command. Thoughts?

Ho, that's a good idea. It looks like hg update --merge is the only command that do not have --continue support. So instead of adding a whole new flag and action to this exception, removing the exception seems like a better move. What do you think @martinvonz ?

Yeah, I agree (sorry, was busy with other stuff today). It should be easy to change this patch from hg resolve --clear to hg update --continue. I might add the hg continue support as separate patch on top.