Painful user experience with 'hg resolve'

Steve Losh steve at stevelosh.com
Tue Aug 30 09:31:19 CDT 2011


On 08/26, Martin Geisler wrote:
> Matt Mackall <mpm at selenic.com> writes:
> 
> I know you think people should use merge tools and then all will be
> well. But it's not realistic to always merge everything at once when you
> do "hg merge". The one file at a time approach we have by firing up the
> merge tool again and again is file for 3 files, but bad for 50+ files
> where you want to merge certain files before you merge others.

I'd personally love an --interactive flag to resolve that would present an interface
kind of like 'hg record's (obviously less verbosely than this example):

    $ hg resolve -i
    file 'src/foo.py' has unresolved conflicts (file 1 of 2)
        [p]review conflicts (to decide if you want to bother with a merge tool)
        [r]esolve conflicts with merge tool
        [e]dit file in $EDITOR with conflict markers
        [s]kip file for now
        [d]one (skip this and all other remaining files for now)
    > r
    which merge tool?
        1. kdiff3
        2. winmerge
    > 1
    ... opens kdiff3 ...

    file 'src/bar.py' has unresolved conflicts (file 2 of 2)
        [p]review conflicts (to decide if you want to bother with a merge tool)
        [r]esolve conflicts with merge tool
        [e]dit file in $EDITOR with conflict markers
        [s]kip file for now
        [d]one (skip this and all other remaining files for now)
    > e
    ... opens emacs/vim/whatever ...
    was the merge successful?
        [y]es (mark file as resolved)
        [n]o (leave file unresolved)
    > y

That way instead of just throwing files at your merge tool and popping up windows
over and over you could go at your own pace, pausing if necessary.

-- 
Steve Losh


More information about the Mercurial-devel mailing list