diff options
author | W. Trevor King <wking@tremily.us> | 2012-08-29 23:26:17 -0400 |
---|---|---|
committer | W. Trevor King <wking@tremily.us> | 2012-08-29 23:31:03 -0400 |
commit | 4db1a045a0606bead191a563abc54dfa8352efe0 (patch) | |
tree | 51c891d731555340ffd4432cd889fb67795ae1b6 /libbe/command/status.py | |
parent | 5a32d82284e54facf2f5dcb03ba37afe3805a609 (diff) | |
download | bugseverywhere-4db1a045a0606bead191a563abc54dfa8352efe0.tar.gz |
Rewrite commands to use bugdirs instead of a single bugdir.
The bulk of the work is in regard to XML, with new BugDir.xml and
.from_xml methods to support the new <bugdir> entity. I also split
the guts import_xml's ._run method into sub-methods to make the import
logic more obvious.
Diffstat (limited to 'libbe/command/status.py')
-rw-r--r-- | libbe/command/status.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libbe/command/status.py b/libbe/command/status.py index bdc9159..dd41190 100644 --- a/libbe/command/status.py +++ b/libbe/command/status.py @@ -36,7 +36,7 @@ class Status (libbe.command.Command): >>> io = libbe.command.StringInputOutput() >>> io.stdout = sys.stdout >>> ui = libbe.command.UserInterface(io=io) - >>> ui.storage_callbacks.set_bugdir(bd) + >>> ui.storage_callbacks.set_storage(bd.storage) >>> cmd = Status(ui=ui) >>> cmd._storage = bd.storage @@ -67,10 +67,11 @@ class Status (libbe.command.Command): ]) def _run(self, **params): - bugdir = self._get_bugdir() + bugdirs = self._get_bugdirs() for bug_id in params['bug-id']: - bug,dummy_comment = \ - libbe.command.util.bug_comment_from_user_id(bugdir, bug_id) + bugdir,bug,comment = ( + libbe.command.util.bugdir_bug_comment_from_user_id( + bugdirs, bug_id)) if bug.status != params['status']: try: bug.status = params['status'] @@ -83,7 +84,7 @@ class Status (libbe.command.Command): def _long_help(self): try: # See if there are any per-tree status configurations - bd = self._get_bugdir() + bugdirs = self._get_bugdirs() except NotImplementedError: pass # No tree, just show the defaults longest_status_len = max([len(s) for s in libbe.bug.status_values]) |