[PATCH 5 of 5] resolve: run happily after conflict-free merge

Augie Fackler raf at durin42.com
Fri Oct 17 09:48:07 CDT 2014


On Fri, Oct 10, 2014 at 09:14:25AM -0700, Martin von Zweigbergk wrote:
> # HG changeset patch
> # User Martin von Zweigbergk <martinvonz at gmail.com>
> # Date 1412832604 25200
> #      Wed Oct 08 22:30:04 2014 -0700
> # Node ID 6bc7728101ed556528790f8949091724e3047a0a
> # Parent  806a523b8b91284e01fbc41f767f87a8fdeac342
> resolve: run happily after conflict-free merge

All looks good to me. Queued.

>
> diff --git a/mercurial/commands.py b/mercurial/commands.py
> --- a/mercurial/commands.py
> +++ b/mercurial/commands.py
> @@ -5291,7 +5291,7 @@
>      try:
>          ms = mergemod.mergestate(repo)
>
> -        if not ms.active() and not show:
> +        if not (ms.active() or repo.dirstate.p2() != nullid) and not show:
>              raise util.Abort(
>                  _('resolve command not applicable when not merging'))
>
> diff --git a/tests/test-resolve.t b/tests/test-resolve.t
> --- a/tests/test-resolve.t
> +++ b/tests/test-resolve.t
> @@ -88,16 +88,14 @@
>    2 files updated, 0 files merged, 0 files removed, 0 files unresolved
>    (branch merge, don't forget to commit)
>
> -BROKEN: resolve --all should do nothing in merge without conflicts
> +resolve --all should do nothing in merge without conflicts
>    $ hg resolve --all
> -  abort: resolve command not applicable when not merging
> -  [255]
> +  (no more unresolved files)
>
> -BROKEN: resolve -m should do nothing in merge without conflicts
> +resolve -m should do nothing in merge without conflicts
>
>    $ hg resolve -m
> -  abort: resolve command not applicable when not merging
> -  [255]
> +  (no more unresolved files)
>
>  get back to conflicting state
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list