aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Gerigk <tgerigk@gmx.de>2006-04-03 20:23:28 +0200
committerThomas Gerigk <tgerigk@gmx.de>2006-04-03 20:23:28 +0200
commit4ca8ca0bab5d57bc6d9e3d714294474829a78e80 (patch)
tree2ae75fcbf9acce9127c11b0ef95d9b04c99792f7
parentc41778afc9b9d487e6a45d5030a8bef9a5c318ce (diff)
downloadbugseverywhere-4ca8ca0bab5d57bc6d9e3d714294474829a78e80.tar.gz
parsified 'target'-help.
(target or aim..)
-rw-r--r--becommands/target.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/becommands/target.py b/becommands/target.py
index d077da5..8f23ac5 100644
--- a/becommands/target.py
+++ b/becommands/target.py
@@ -35,6 +35,7 @@ def execute(args):
No target assigned.
>>> tests.clean_up()
"""
+ options, args = get_parser().parse_args(args)
assert(len(args) in (0, 1, 2))
if len(args) == 0:
print help()
@@ -52,10 +53,11 @@ def execute(args):
bug.target = args[1]
bug.save()
+def get_parser():
+ parser = cmdutil.CmdOptionParser("be target bug-id [target]")
+ return parser
-def help():
- return """be target bug-id [target]
-
+longhelp="""
Show or change a bug's target for fixing.
If no target is specified, the current value is printed. If a target
@@ -66,3 +68,7 @@ milestone names or release numbers.
The value "none" can be used to unset the target.
"""
+
+def help():
+ return get_parser().help_str() + longhelp
+