/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: Robert Collins
  • Date: 2009-06-15 09:07:02 UTC
  • mto: This revision was merged to the branch mainline in revision 4441.
  • Revision ID: robertc@robertcollins.net-20090615090702-okjak2a1t826no8n
Unbreak blackbox tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1056
1056
 
1057
1057
def install_bzr_command_hooks():
1058
1058
    """Install the hooks to supply bzr's own commands."""
 
1059
    if _list_bzr_commands in Command.hooks["list_commands"]:
 
1060
        return
1059
1061
    Command.hooks.install_named_hook("list_commands", _list_bzr_commands,
1060
1062
        "bzr commands")
1061
1063
    Command.hooks.install_named_hook("get_command", _get_bzr_command,
1099
1101
        except UnicodeDecodeError:
1100
1102
            raise errors.BzrError("argv should be list of unicode strings.")
1101
1103
        argv = new_argv
1102
 
    install_bzr_command_hooks()
1103
1104
    ret = run_bzr_catch_errors(argv)
1104
1105
    trace.mutter("return code %d", ret)
1105
1106
    return ret
1111
1112
    This function assumed that that UI layer is setup, that symbol deprecations
1112
1113
    are already applied, and that unicode decoding has already been performed on argv.
1113
1114
    """
 
1115
    install_bzr_command_hooks()
1114
1116
    return exception_to_return_code(run_bzr, argv)
1115
1117
 
1116
1118
 
1120
1122
    This is used for the test suite, and might be useful for other programs
1121
1123
    that want to wrap the commandline interface.
1122
1124
    """
 
1125
    install_bzr_command_hooks()
1123
1126
    try:
1124
1127
        return run_bzr(argv)
1125
1128
    except Exception, e: