aboutsummaryrefslogtreecommitdiffstats
path: root/becommands
diff options
context:
space:
mode:
authorThomas Gerigk <tgerigk@gmx.de>2006-04-03 20:16:45 +0200
committerThomas Gerigk <tgerigk@gmx.de>2006-04-03 20:16:45 +0200
commitc41778afc9b9d487e6a45d5030a8bef9a5c318ce (patch)
treeb42cb2eafa338610803ff29bee4b6ec1f7ce1ca0 /becommands
parent54001214bc8fb46702060e62bde42ff15963b8f1 (diff)
downloadbugseverywhere-c41778afc9b9d487e6a45d5030a8bef9a5c318ce.tar.gz
added help to 'show'.
Diffstat (limited to 'becommands')
-rw-r--r--becommands/show.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/becommands/show.py b/becommands/show.py
index 9e60586..314cf46 100644
--- a/becommands/show.py
+++ b/becommands/show.py
@@ -19,9 +19,10 @@ from libbe import bugdir, cmdutil, utility
import os
def execute(args):
- bug_dir = cmdutil.bug_tree()
+ options, args = get_parser().parse_args(args)
if len(args) !=1:
raise cmdutil.UserError("Please specify a bug id.")
+ bug_dir = cmdutil.bug_tree()
bug = cmdutil.get_bug(args[0], bug_dir)
print cmdutil.bug_summary(bug, list(bug_dir.list())).rstrip("\n")
if bug.time is None:
@@ -35,3 +36,15 @@ def execute(args):
print "From: %s" % comment.From
print "Date: %s\n" % utility.time_to_str(comment.date)
print comment.body.rstrip('\n')
+
+def get_parser():
+ parser = cmdutil.CmdOptionParser("be show bug-id")
+ return parser
+
+longhelp="""
+Show all information about a bug.
+"""
+
+def help():
+ return get_parser().help_str() + longhelp
+