From 87e356c9208e955fcf6c20c0b271db87bdd48014 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Fri, 14 Nov 2008 19:25:44 -0500 Subject: Split Bug and Comment class out to bug.py from bugdir.py Comment should probably have it's own file too... I also tried to clean up the interface for setting status and severity. Both attributes involve selecting strings from predefined lists. The lists of valid strings (and descriptions of each string) are now defined in bug.py. The bug.py lists are then used to generate appropriate help strings in becommands/status.py and severity.py. This should make it easier to keep the help strings in synch with the validation information. The original status strings weren't documented, and I didn't know what they all ment, so I elimanted some of them. 'in-progress' and 'disabled' are no longer with us. Of course, it would be simple to add them back in if people don't agree with me on that. Due to the loss of 'disabled' I had to change the status of two bugs (11e and 597) to 'closed'. I removed becommands/inprogress.py as well. It's functionality was replaced by the more general status.py command, which mimics the severity.py command. --- becommands/help.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'becommands/help.py') diff --git a/becommands/help.py b/becommands/help.py index aa4aa64..45d35ca 100644 --- a/becommands/help.py +++ b/becommands/help.py @@ -15,7 +15,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA """Print help for given subcommand""" -from libbe import bugdir, cmdutil, names, utility +from libbe import cmdutil, names, utility def execute(args): """ -- cgit From e7c376ed286b3bf741ae9e364eef7dd2114d77c7 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sun, 16 Nov 2008 14:12:06 -0500 Subject: 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. --- becommands/help.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'becommands/help.py') diff --git a/becommands/help.py b/becommands/help.py index 45d35ca..f6cfe3f 100644 --- a/becommands/help.py +++ b/becommands/help.py @@ -16,6 +16,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA """Print help for given subcommand""" from libbe import cmdutil, names, utility +__desc__ = __doc__ def execute(args): """ @@ -25,7 +26,7 @@ def execute(args): if len(args) > 1: raise cmdutil.UserError("Too many arguments.") if len(args) == 0: - cmdutil.print_command_list() + print cmdutil.help() else: try: print cmdutil.help(args[0]) -- cgit From 23179f50092d91dbeab97ad2b88cdaadb79b615f Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Fri, 21 Nov 2008 14:56:05 -0500 Subject: Another major rewrite. Now BugDir, Bug, and Comment are more distinct. I pushed a lot of the little helper functions into the main classes, which makes it easier for me to keep track of what's going on. I'm now at the point where I can run through `python test.py` with each of the backends (by changing the search order in rcs.py _get_matching_rcs) without any unexpected errors for each backend (except Arch). I can also run `test_usage.sh` without non-Arch errors either. However, don't consider this a stable commit yet. The bzr backend is *really*slow*, and the other's aren't blazingly fast either. I think I'm rewriting the entire database every time I save it :p. Still, it passes the checks. and I don't like it when zounds of changes build up. --- becommands/help.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'becommands/help.py') diff --git a/becommands/help.py b/becommands/help.py index f6cfe3f..bf0b4fc 100644 --- a/becommands/help.py +++ b/becommands/help.py @@ -15,7 +15,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA """Print help for given subcommand""" -from libbe import cmdutil, names, utility +from libbe import cmdutil, utility __desc__ = __doc__ def execute(args): -- cgit