[PATCH 0 of 1] Select internal conflict resolution tool with a merge option

Greg Ward greg-hg at gerg.ca
Sun Mar 7 12:41:21 CST 2010


On Sun, Mar 7, 2010 at 11:38 AM, Isaac Jurado <diptongo at gmail.com> wrote:
> --- a/mercurial/commands.py     Sat Mar 06 13:29:54 2010 +0100
> +++ b/mercurial/commands.py     Sun Mar 07 17:36:50 2010 +0100
> @@ -2254,6 +2254,15 @@
>         displayer.close()
>         return 0
>
> +    if opts.get('dummy'):
> +        wlock = repo.wlock()
> +        try:
> +            repo.dirstate.setparents(repo.lookup(rev1), repo.lookup(rev2))
> +        finally:
> +            wlock.release()
> +        repo.ui.status(_("(dummy merge, don't forget to commit)\n"))
> +        return 0
> +
>     return hg.merge(repo, node, force=opts.get('force'))

I'm planning to implement something like this for work, but probably
as a separate 'dummymerge' command.

[...]
> But I believe such code is not very smart.

Mainly because it should just commit for the user.  Merge does not
automatically commit because the user should review the result of a
merge. But a dummy merge by definition doesn't change anything, so
there's nothing to review.  The only thing up to the user is the
commit message, and that's easily handled with the usual -m/-l/-e
options.  But changing merge to commit with --dummy is evil, which is
why I think this should be a separate command.  I doubt it would be
accepted in core Mercurial, so I was just going to throw it into our
local "hacks" extension.

Greg


More information about the Mercurial-devel mailing list