changeset 9459:3b283adcc720

bookmarks: support --quiet
author Steve Losh <steve@stevelosh.com>
date Thu, 17 Sep 2009 22:28:47 -0400
parents c564dbb2a6d5
children 552c5a5a3502
files hgext/bookmarks.py
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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):