[PATCH 5 of 8] discovery: tweak error message for multiple branch heads

Mads Kiilerich mads at kiilerich.com
Sun Nov 17 10:42:37 CST 2013


On 11/17/2013 11:29 AM, Mads Kiilerich wrote:
> # HG changeset patch
> # User Mads Kiilerich <madski at unity3d.com>
> # Date 1384634789 18000
> #      Sat Nov 16 15:46:29 2013 -0500
> # Branch stable
> # Node ID de7385c8e0bc3227a2ad5b38ce4eb2e4b6b95801
> # Parent  05bbbe484c2a01396babd2a7e3cf0599254fb157
> discovery: tweak error message for multiple branch heads

This one should perhaps go to stable.

/Mads

>
> diff --git a/mercurial/discovery.py b/mercurial/discovery.py
> --- a/mercurial/discovery.py
> +++ b/mercurial/discovery.py
> @@ -313,8 +313,8 @@ def checkheads(repo, remote, outgoing, r
>               if 1 < len(newhs):
>                   dhs = list(newhs)
>                   if error is None:
> -                    error = (_("push creates multiple headed new branch '%s'")
> -                             % (branch))
> +                    error = (_("push creates new branch '%s' "
> +                               "with multiple heads") % (branch))
>                       hint = _("merge or"
>                                " see \"hg help push\" for details about"
>                                " pushing new heads")
> diff --git a/tests/test-push-warn.t b/tests/test-push-warn.t
> --- a/tests/test-push-warn.t
> +++ b/tests/test-push-warn.t
> @@ -367,7 +367,7 @@ Pushing muliple headed new branch:
>     $ hg push --branch f --new-branch ../f
>     pushing to ../f
>     searching for changes
> -  abort: push creates multiple headed new branch 'f'
> +  abort: push creates new branch 'f' with multiple heads
>     (merge or see "hg help push" for details about pushing new heads)
>     [255]
>     $ hg push --branch f --new-branch --force ../f



More information about the Mercurial-devel mailing list