Rev 4132: Unbreak blackbox tests. in http://people.ubuntu.com/~robertc/baz2.0/integration
Robert Collins
robertc at robertcollins.net
Mon Jun 15 10:07:05 BST 2009
At http://people.ubuntu.com/~robertc/baz2.0/integration
------------------------------------------------------------
revno: 4132
revision-id: robertc at robertcollins.net-20090615090702-okjak2a1t826no8n
parent: robertc at robertcollins.net-20090615085652-5q1mpqk2hq2fczrh
committer: Robert Collins <robertc at robertcollins.net>
branch nick: integration
timestamp: Mon 2009-06-15 19:07:02 +1000
message:
Unbreak blackbox tests.
=== modified file 'bzrlib/commands.py'
--- a/bzrlib/commands.py 2009-06-15 08:20:38 +0000
+++ b/bzrlib/commands.py 2009-06-15 09:07:02 +0000
@@ -1056,6 +1056,8 @@
def install_bzr_command_hooks():
"""Install the hooks to supply bzr's own commands."""
+ if _list_bzr_commands in Command.hooks["list_commands"]:
+ return
Command.hooks.install_named_hook("list_commands", _list_bzr_commands,
"bzr commands")
Command.hooks.install_named_hook("get_command", _get_bzr_command,
@@ -1099,7 +1101,6 @@
except UnicodeDecodeError:
raise errors.BzrError("argv should be list of unicode strings.")
argv = new_argv
- install_bzr_command_hooks()
ret = run_bzr_catch_errors(argv)
trace.mutter("return code %d", ret)
return ret
@@ -1111,6 +1112,7 @@
This function assumed that that UI layer is setup, that symbol deprecations
are already applied, and that unicode decoding has already been performed on argv.
"""
+ install_bzr_command_hooks()
return exception_to_return_code(run_bzr, argv)
@@ -1120,6 +1122,7 @@
This is used for the test suite, and might be useful for other programs
that want to wrap the commandline interface.
"""
+ install_bzr_command_hooks()
try:
return run_bzr(argv)
except Exception, e:
More information about the bazaar-commits
mailing list