From: Chris Ball Date: Wed, 24 Jun 2009 21:25:02 +0000 (-0400) Subject: Add "be target list", to show a list of existing targets. X-Git-Tag: 1.0.0~74 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4a9dde55b83b92866daae3f408c7a31e20d9e0ab;p=be.git Add "be target list", to show a list of existing targets. --- diff --git a/becommands/target.py b/becommands/target.py index c83ffa7..e7ebcca 100644 --- a/becommands/target.py +++ b/becommands/target.py @@ -39,6 +39,12 @@ def execute(args, test=False): if len(args) not in (1, 2): raise cmdutil.UsageError bd = bugdir.BugDir(from_disk=True, manipulate_encodings=not test) + if len(args) == 1 and args[0] == "list": + ts = set([bd.bug_from_uuid(bug).target for bug in bd.list_uuids()]) + for target in sorted(ts): + if target: + print target + return bug = bd.bug_from_shortname(args[0]) if len(args) == 1: if bug.target is None or bug.target is settings_object.EMPTY: