question about get_cmd_object

Alexander Belchenko bialix at ukr.net
Fri Jun 26 10:52:34 BST 2009


Martin (gzlist) пишет:
> 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...

Thanks for the hint.

Though there is no hints in the doc for get_cmd_object() functionitself 
about these new hooks. :-/




More information about the bazaar mailing list