changeset 22644:1ec7cdaf898f

bookmarks: allow `updatefromremote` to be quiet This will be useful to use the function during clone (clone is not printing any bookmark data right now)
author Pierre-Yves David <pierre-yves.david@fb.com>
date Thu, 02 Oct 2014 12:16:07 -0500
parents 3b1c0e1ede4c
children 6e431e1635b6
files mercurial/bookmarks.py
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/bookmarks.py	Thu Oct 02 12:39:37 2014 -0500
+++ b/mercurial/bookmarks.py	Thu Oct 02 12:16:07 2014 -0500
@@ -353,17 +353,22 @@
     (addsrc, adddst, advsrc, advdst, diverge, differ, invalid
      ) = compare(repo, remotemarks, localmarks, dsthex=hex)
 
+    status = ui.status
+    warn = ui.warn
+    if ui.configbool('ui', 'quietbookmarkmove', False):
+        status = warn = ui.debug
+
     changed = []
     for b, scid, dcid in addsrc:
         if scid in repo: # add remote bookmarks for changes we already have
-            changed.append((b, bin(scid), ui.status,
+            changed.append((b, bin(scid), status,
                             _("adding remote bookmark %s\n") % (b)))
     for b, scid, dcid in advsrc:
-        changed.append((b, bin(scid), ui.status,
+        changed.append((b, bin(scid), status,
                         _("updating bookmark %s\n") % (b)))
     for b, scid, dcid in diverge:
         db = _diverge(ui, b, path, localmarks)
-        changed.append((db, bin(scid), ui.warn,
+        changed.append((db, bin(scid), warn,
                         _("divergent bookmark %s stored as %s\n") % (b, db)))
     if changed:
         for b, node, writer, msg in sorted(changed):