diff options
author | W. Trevor King <wking@drexel.edu> | 2008-11-25 16:07:08 -0500 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2008-11-25 16:07:08 -0500 |
commit | da9c84914deb5da645f46cff892d1245cd4eaf99 (patch) | |
tree | c7fe9a19c65fbc9bf92602ae3be691b0f61bbad2 /becommands | |
parent | 5699aef2a5741c5ffc24d9cb12d6bc9b085d484a (diff) | |
download | bugseverywhere-da9c84914deb5da645f46cff892d1245cd4eaf99.tar.gz |
added -u/uuids option to becommands/list
Diffstat (limited to 'becommands')
-rw-r--r-- | becommands/list.py | 27 | ||||
-rw-r--r-- | becommands/show.py | 2 |
2 files changed, 22 insertions, 7 deletions
diff --git a/becommands/list.py b/becommands/list.py index c63039d..1f5b462 100644 --- a/becommands/list.py +++ b/becommands/list.py @@ -113,15 +113,18 @@ def execute(args, test=False): if len(bugs) == 0: print "No matching bugs found" - def list_bugs(cur_bugs, title=None, no_target=False): + def list_bugs(cur_bugs, title=None, just_uuids=False): cur_bugs.sort(cmp_full) if len(cur_bugs) > 0: if title != None: print cmdutil.underlined(title) for bug in cur_bugs: - print bug.string(shortlist=True) + if just_uuids: + print bug.uuid + else: + print bug.string(shortlist=True) - list_bugs(bugs, no_target=False) + list_bugs(bugs, just_uuids=options.uuids) def get_parser(): parser = cmdutil.CmdOptionParser("be list [options]") @@ -134,10 +137,11 @@ def get_parser(): parser.add_option("-t", "--target", metavar="TARGET", dest="target", help="List options matching TARGET", default=None) # boolean shortucts. All of these are special cases of long forms - bools = (("w", "wishlist", "List bugs with 'wishlist' severity"), + bools = (("u", "uuids", "Only print the bug UUIDS"), + ("w", "wishlist", "List bugs with 'wishlist' severity"), ("i", "important", "List bugs with >= 'serious' severity"), ("A", "active", "List all active bugs"), - ("u", "unconfirmed", "List unconfirmed bugs"), + ("U", "unconfirmed", "List unconfirmed bugs"), ("o", "open", "List open bugs"), ("T", "test", "List bugs in testing"), ("m", "mine", "List bugs assigned to you"), @@ -152,8 +156,17 @@ def get_parser(): return parser longhelp=""" -This command lists bugs. There are several criteria that you can -search by: +This command lists bugs. Normally it prints a short string like + 576:om: Allow attachments +Where + 576 the bug id + o the bug status is 'open' (first letter) + m the bug severity is 'minor' (first letter) + Allo... the bug summary string + +You can optionally (-u) print only the bug ids. + +There are several criteria that you can filter by: * status * severity * assigned (who the bug is assigned to) diff --git a/becommands/show.py b/becommands/show.py index 3bd7e63..c58e6bb 100644 --- a/becommands/show.py +++ b/becommands/show.py @@ -42,6 +42,8 @@ def execute(args, test=False): for bugid in args: bug = bd.bug_from_shortname(bugid) print bug.string(show_comments=True) + if bugid != args[-1]: + print "" # add a blank line between bugs def get_parser(): parser = cmdutil.CmdOptionParser("be show BUG-ID [BUG-ID ...]") |