question about get_cmd_object

Martin (gzlist) gzlist at googlemail.com
Fri Jun 26 10:43:25 BST 2009


On 26/06/2009, Alexander Belchenko <bialix at ukr.net> wrote:
> C:\work\Bazaar\bzr-repo\bzr>python -c "import bzrlib.commands; print
> bzrlib.commands.get_cmd_object('branch',False)"
> Traceback (most recent call last):
>    File "<string>", line 1, in <module>
>    File "bzrlib\commands.py", line 212, in get_cmd_object
>      raise errors.BzrCommandError('unknown command "%s"' % cmd_name)
> bzrlib.errors.BzrCommandError: unknown command "branch"

I get the command object printed in 1.14.1 but looking at the dev
source, seems you now need to call
bzrlib.commands.install_bzr_command_hooks() first.

> Why I've got error? What is the right way to use this function?

Whether that's the *right* way or not though...

Martin



More information about the bazaar mailing list