aboutsummaryrefslogtreecommitdiffstats
path: root/becommands/new.py
diff options
context:
space:
mode:
authorAaron Bentley <abentley@panoramicfeedback.com>2005-05-18 15:29:33 +0000
committerAaron Bentley <abentley@panoramicfeedback.com>2005-05-18 15:29:33 +0000
commit68d24277a1fbd47e3e5af21594ed0f3401669b90 (patch)
tree568e6b05b0dd2cca1605959ec510ac706eccbe14 /becommands/new.py
parente77fb4d6b952a69b692155c20f4ff248266944a1 (diff)
downloadbugseverywhere-68d24277a1fbd47e3e5af21594ed0f3401669b90.tar.gz
Improved command parsing for "new"
Diffstat (limited to 'becommands/new.py')
-rw-r--r--becommands/new.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/becommands/new.py b/becommands/new.py
index 29182ed..df97236 100644
--- a/becommands/new.py
+++ b/becommands/new.py
@@ -37,6 +37,7 @@ def execute(args):
True
>>> tests.clean_up()
"""
+ options, args = get_parser().parse_args(args)
if len(args) != 1:
raise cmdutil.UserError("Please supply a summary message")
dir = cmdutil.bug_tree()
@@ -46,3 +47,14 @@ def execute(args):
bugs = (dir.list())
print "Created bug with ID %s" % cmdutil.unique_name(bug, bugs)
+def get_parser():
+ parser = cmdutil.CmdOptionParser("be new SUMMARY")
+ return parser
+
+longhelp="""
+Create a new bug, with a new ID. The summary specified on the commandline
+is a string that describes the bug briefly.
+"""
+
+def help():
+ return get_parser().help_str() + longhelp