Writing a Bazaar plugin - register command? -
I'm having trouble writing my market plug-in.
I'm trying something different things, and this is the current state of my file:
'BZR plugins' from 'bzrlib.commands' command , Register_command import version_info = (0,0,1, 'Dev') class cmd_test_foo (command): '' 'test is painful' 'Def defaced (self): Print "Hello" register_command (cmd_test_foo)
< / Pre>Here's what happens when I try to execute my order:
$ BzR test foo Hi BzR: Error: Unknown command "test foo"
so that really Ib - it clearly is going my order, but tells me it is unknown
builtins.py but have suggested but nothing was helping.
Since I did not get any real information about this error on the web or so on, I decided I should post and answer my only question.
The market imports a plugin when it creates an .pyc file importing normally from Python if something is magical - like editing in a directory and forget to copy it, and Creating Simlink - This will never import modifications. To register the command,
register_command (cmd_test_foo)
call is required, where cmd_test_foo is your command name. When you call bzr help orders, this will also look like this:$ bzr help order ... (erosion order) test-foo test is painful. [TestCmd] ... (Press the other commands)
and
$ bzr plugin testCmd 0.0.1.dev test BZR plug-in
On that last one you will also see other installed plugins.
Comments
Post a Comment