bookmarks: support --quiet
authorSteve Losh <steve@stevelosh.com>
Thu, 17 Sep 2009 22:28:47 -0400
changeset 9459 3b283adcc720
parent 9456 c564dbb2a6d5
child 9460 552c5a5a3502
bookmarks: support --quiet
hgext/bookmarks.py
--- a/hgext/bookmarks.py	Thu Sep 17 21:52:08 2009 +0200
+++ b/hgext/bookmarks.py	Thu Sep 17 22:28:47 2009 -0400
@@ -193,8 +193,11 @@
                 else:
                     prefix = (n == cur) and '*' or ' '
 
-                ui.write(" %s %-25s %d:%s\n" % (
-                    prefix, bmark, repo.changelog.rev(n), hexfn(n)))
+                if ui.quiet:
+                    ui.write("%s\n" % bmark)
+                else:
+                    ui.write(" %s %-25s %d:%s\n" % (
+                        prefix, bmark, repo.changelog.rev(n), hexfn(n)))
         return
 
 def _revstostrip(changelog, node):