summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--subcmds/abandon.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/subcmds/abandon.py b/subcmds/abandon.py
index 5d56abf7..33011210 100644
--- a/subcmds/abandon.py
+++ b/subcmds/abandon.py
@@ -37,6 +37,9 @@ It is equivalent to "git branch -D <branchname>".
37""" 37"""
38 38
39 def _Options(self, p): 39 def _Options(self, p):
40 p.add_option('-q', '--quiet',
41 action='store_true', default=False,
42 help='be quiet')
40 p.add_option('--all', 43 p.add_option('--all',
41 dest='all', action='store_true', 44 dest='all', action='store_true',
42 help='delete all branches in all projects') 45 help='delete all branches in all projects')
@@ -93,11 +96,14 @@ It is equivalent to "git branch -D <branchname>".
93 file=sys.stderr) 96 file=sys.stderr)
94 sys.exit(1) 97 sys.exit(1)
95 else: 98 else:
96 print('Abandoned branches:', file=sys.stderr) 99 # Everything below here is displaying status.
100 if opt.quiet:
101 return
102 print('Abandoned branches:')
97 for br in success.keys(): 103 for br in success.keys():
98 if len(all_projects) > 1 and len(all_projects) == len(success[br]): 104 if len(all_projects) > 1 and len(all_projects) == len(success[br]):
99 result = "all project" 105 result = "all project"
100 else: 106 else:
101 result = "%s" % ( 107 result = "%s" % (
102 ('\n' + ' ' * width + '| ').join(p.relpath for p in success[br])) 108 ('\n' + ' ' * width + '| ').join(p.relpath for p in success[br]))
103 print("%s%s| %s\n" % (br, ' ' * (width - len(br)), result), file=sys.stderr) 109 print("%s%s| %s\n" % (br, ' ' * (width - len(br)), result))