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

Kevin Berridge kevin.w.berridge at gmail.com
Fri Mar 11 20:56:36 CST 2011


# 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"))
     else:
         ui.status(_("(run 'hg update' to get a working copy)\n"))
 
diff -r 91ce954ac34a -r 90b19cade984 tests/test-pull-branch2.t
--- a/tests/test-pull-branch2.t	Fri Mar 11 20:43:12 2011 -0500
+++ b/tests/test-pull-branch2.t	Fri Mar 11 20:55:13 2011 -0500
@@ -27,4 +27,4 @@
   adding manifests
   adding file changes
   added 1 changesets with 1 changes to 1 files (+1 heads)
-  (run 'hg heads' to see heads)
+  (new branch head[s] added, run 'hg update [new branch]' to get a working copy)


More information about the Mercurial-devel mailing list