[PATCH 2 of 2] New output message from hg pull suggests better update action when a new branch head is added

Martin Geisler mg at lazybytes.net
Sun Mar 13 04:55:30 CDT 2011


Kevin Berridge <kevin.w.berridge at gmail.com> writes:

> # HG changeset patch
> # User Kevin Berridge <kevin.w.berridge at gmail.com>
> # Date 1299894913 18000
> # Node ID 90b19cade98425061f755120ffef2849e122e952
> # Parent  91ce954ac34a868124f49570e72aca4b012ac43c
> New output message from hg pull suggests better update action when a new branch head is added.
>
> This patch changes the output message from hg pull when new heads are added on other branches but not on the current branch to "(new branch head[s] added, run 'hg update [new branch]' to get a working copy)"
>
> diff -r 91ce954ac34a -r 90b19cade984 mercurial/commands.py
> --- a/mercurial/commands.py	Fri Mar 11 20:43:12 2011 -0500
> +++ b/mercurial/commands.py	Fri Mar 11 20:55:13 2011 -0500
> @@ -2894,7 +2894,8 @@
>          if (len(repo.branchheads()) > 1):
>              ui.status(_("(run 'hg heads' to see heads, 'hg merge' to merge)\n"))
>          else:
> -            ui.status(_("(run 'hg heads' to see heads)\n"))
> +            ui.status(_("(new branch head[s] added, run 'hg update" +
> +              " [new branch]' to get a working copy)\n"))

We don't do "head[s]" or "head(s)" in Mercurial, we always use the
plural version.

-- 
Martin Geisler

aragost Trifork
Professional Mercurial support
http://aragost.com/mercurial/


More information about the Mercurial-devel mailing list