Bug 1533 - "abort: outstanding uncommitted merges" should mention "update -C"
Summary: "abort: outstanding uncommitted merges" should mention "update -C"
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: unspecified
Hardware: All All
: normal bug
Assignee: Bugzilla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-04 03:42 UTC by Colin Barrett
Modified: 2012-05-13 04:53 UTC (History)
4 users (show)

See Also:
Python Version: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Colin Barrett 2009-03-04 03:42 UTC
Sometimes, you just want to blow away a merge and start over. This is a rough
transcript of what happened to me after some time away from Mercurial:

> hg pull
(+1 heads)
> hg merge
2 files unresolved
use 'hg resolve' to retry unresolved file merges
> hg revert --no-backup --all
abort: uncommitted merge - please provide a specific revision
> hg revert --no-backup --all -r tip
> hg parents
[ two parents listed ]
> hg update -r tip
abort: outstanding uncommitted merges
> hg update --help
 -C --clean  overwrite locally modified files (no backup)
> hg update -C -r tip
0 files unresolved

The UI here is lacking. At the very least the abort from update should mention
-C. The abort from revert could also mention it, but that's debatable.

My suggestion is adding the following line of output below the abort messages:
to throw away the merge completely, use 'hg update --clean'
Comment 1 Augie Fackler 2009-03-04 09:18 UTC
This was confusing to me as well when I first came to hg. +1 on mentioning it 
somewhere more obvious, probably in the message about resolve, eg change that to 
read:
use 'hg resolve' to retry unresolved file merges or 'hg update --clean' to discard 
the merge
Comment 2 Augie Fackler 2009-03-04 20:44 UTC
Fixed in 9fe7e6acf525.
Comment 3 Bugzilla 2012-05-12 08:57 UTC

--- Bug imported by bugzilla@serpentine.com 2012-05-12 08:57 EDT  ---

This bug was previously known as _bug_ 1533 at http://mercurial.selenic.com/bts/issue1533