diff options
author | W. Trevor King <wking@drexel.edu> | 2009-06-25 09:11:32 -0400 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2009-06-25 09:11:32 -0400 |
commit | eeaf13d7d9c5e6fcad4689c988d4fc1806426d3f (patch) | |
tree | c4579ec93a80f5e93b4258e8771ae39405ce9ba7 /becommands/list.py | |
parent | d2e349295ecd2f4c3e41f4f5925eb746873e8103 (diff) | |
parent | ea62dd57fa0ea41a164c02129cb0e70a3298bc9f (diff) | |
download | bugseverywhere-eeaf13d7d9c5e6fcad4689c988d4fc1806426d3f.tar.gz |
Merged extra-strings branch, adding be tag/depend.
Diffstat (limited to 'becommands/list.py')
-rw-r--r-- | becommands/list.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/becommands/list.py b/becommands/list.py index 1f06569..fa2f592 100644 --- a/becommands/list.py +++ b/becommands/list.py @@ -109,6 +109,8 @@ def execute(args, test=False): target.append(bd.target) if target == []: # set the default value target = "all" + if options.extra_strings != None: + required_extra_strings = options.extra_strings.split(',') def filter(bug): if status != "all" and not bug.status in status: @@ -119,6 +121,10 @@ def execute(args, test=False): return False if target != "all" and not bug.target in target: return False + if options.extra_strings != None: + for string in bug.extra_strings: + if string not in required_extra_strings: + return False return True bugs = [b for b in bd if filter(b) ] @@ -152,13 +158,15 @@ def execute(args, test=False): def get_parser(): parser = cmdutil.CmdOptionParser("be list [options]") parser.add_option("-s", "--status", metavar="STATUS", dest="status", - help="List options matching STATUS", default=None) + help="List bugs matching STATUS", default=None) parser.add_option("-v", "--severity", metavar="SEVERITY", dest="severity", - help="List options matching SEVERITY", default=None) + help="List bugs matching SEVERITY", default=None) parser.add_option("-a", "--assigned", metavar="ASSIGNED", dest="assigned", - help="List options matching ASSIGNED", default=None) + help="List bugs matching ASSIGNED", default=None) parser.add_option("-t", "--target", metavar="TARGET", dest="target", - help="List options matching TARGET", default=None) + help="List bugs matching TARGET", default=None) + parser.add_option("-e", "--extra-strings", metavar="STRINGS", dest="extra_strings", + help="List bugs matching _all_ extra strings in comma-seperated list STRINGS. e.g. --extra-strings TAG:working,TAG:xml", default=None) parser.add_option("-S", "--sort", metavar="SORT-BY", dest="sort_by", help="Adjust bug-sort criteria with comma-separated list SORT-BY. e.g. \"--sort creator,time\". Available criteria: %s" % ','.join(AVAILABLE_CMPS), default=None) # boolean options. All but uuids and xml are special cases of long forms |