aboutsummaryrefslogtreecommitdiffstats
path: root/be
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2008-11-16 14:12:06 -0500
committerW. Trevor King <wking@drexel.edu>2008-11-16 14:12:06 -0500
commite7c376ed286b3bf741ae9e364eef7dd2114d77c7 (patch)
tree095386a2f4f1d7aac1520b4e9689667decff41cf /be
parentdbe327909b048e0709b598fd60f02ef53b25a0ea (diff)
downloadbugseverywhere-e7c376ed286b3bf741ae9e364eef7dd2114d77c7.tar.gz
Added 'remove' command to remove bugs. Use __desc__ for command help.
Using the __desc__ reduces documentation duplication. It's also better than using __doc__, because __doc__ could (should?) be more than one-line long, and we just want a short description to jog our memories in the complete command list. Also moved unique_name from cmdutil.py to names.py to avoid the bug->cmdutil->bugdir->bug cyclic include.
Diffstat (limited to 'be')
-rwxr-xr-xbe31
1 files changed, 4 insertions, 27 deletions
diff --git a/be b/be
index 9be1804..ea7f65a 100755
--- a/be
+++ b/be
@@ -22,39 +22,16 @@ from libbe.bugdir import tree_root, create_bug_dir
from libbe import names, plugin, cmdutil
import sys
import os
-import becommands.severity
-import becommands.status
-import becommands.list
-import becommands.show
-import becommands.set_root
-import becommands.new
-import becommands.close
-import becommands.open
-__doc__ = """Bugs Everywhere - Distributed bug tracking
-
-Supported becommands
- set-root: assign the root directory for bug tracking
- new: Create a new bug
- list: list bugs
- show: show a particular bug
- close: close a bug
- open: re-open a bug
- severity: %s
- status: %s
-
-Unimplemented becommands
- comment: append a comment to a bug
-""" % (becommands.severity.__desc__,
- becommands.status.__desc__)
-
+import becommands
+__doc__ == cmdutil.help()
if len(sys.argv) == 1 or sys.argv[1] in ('--help', '-h'):
- cmdutil.print_command_list()
+ print cmdutil.help()
else:
try:
try:
- sys.exit(execute(sys.argv[1], sys.argv[2:]))
+ sys.exit(cmdutil.execute(sys.argv[1], sys.argv[2:]))
except KeyError, e:
raise UserError("Unknown command \"%s\"" % e.args[0])
except cmdutil.GetHelp: