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

Kevin Berridge kevin.w.berridge at gmail.com
Mon Mar 14 21:22:15 CDT 2011


# HG changeset patch
# User Kevin Berridge <kevin.w.berridge at gmail.com>
# Date 1299894913 18000
# Node ID af5a7dd472ad2056475e870979dd01a8aafd3df5
# Parent  74e518e0dc1418c01584cd7efb9bda53e97fb7e2
pull: new output message 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 heads added, run 'hg update [new branch]' to get a working copy)"

diff -r 74e518e0dc14 -r af5a7dd472ad 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 heads 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 74e518e0dc14 -r af5a7dd472ad tests/test-pull-branch.t
--- a/tests/test-pull-branch.t	Fri Mar 11 20:43:12 2011 -0500
+++ b/tests/test-pull-branch.t	Fri Mar 11 20:55:13 2011 -0500
@@ -160,4 +160,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 heads added, run 'hg update [new branch]' to get a working copy)


More information about the Mercurial-devel mailing list