From 4a9dde55b83b92866daae3f408c7a31e20d9e0ab Mon Sep 17 00:00:00 2001 From: Chris Ball Date: Wed, 24 Jun 2009 17:25:02 -0400 Subject: [PATCH] Add "be target list", to show a list of existing targets. --- becommands/target.py | 6 ++++++ 1 file changed, 6 insertions(+) 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: -- 2.26.2