changeset 1040:35e883d1ff9b

Show number of new heads when doing a pull
author mpm@selenic.com
date Wed, 24 Aug 2005 18:42:42 -0700
parents 4296754ba7b4
children 3ce272b96494
files mercurial/hg.py
diffstat 1 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hg.py	Wed Aug 24 18:40:17 2005 -0700
+++ b/mercurial/hg.py	Wed Aug 24 18:42:42 2005 -0700
@@ -1569,6 +1569,8 @@
 
         tr = self.transaction()
 
+        oldheads = len(self.changelog.heads())
+
         # pull off the changeset group
         self.ui.status("adding changesets\n")
         co = self.changelog.tip()
@@ -1592,9 +1594,14 @@
             revisions += fl.count() - o
             files += 1
 
+        newheads = len(self.changelog.heads())
+        heads = ""
+        if oldheads and newheads > oldheads:
+            heads = " (+%d heads)" % (newheads - oldheads)
+
         self.ui.status(("added %d changesets" +
-                        " with %d changes to %d files\n")
-                       % (changesets, revisions, files))
+                        " with %d changes to %d files%s\n")
+                       % (changesets, revisions, files, heads))
 
         tr.close()