Latest bzr crashes with plugins command

Alexander Belchenko bialix at ukr.net
Wed Jan 30 07:10:50 GMT 2008


Guillermo Gonzalez пишет:
> On Jan 29, 2008 10:10 PM, Aaron Bentley <aaron at aaronbentley.com> wrote:
>> So it's not really plausible to get this message from a pristine bzr.
>>
>> However, I note you've got the xmloutput plugin installed, and that
>> provides a plugins command.
>>
>> If I install xmloutput, I get the same results as you.  So I believe
>> bzr-xmloutput is broken, not Bazaar.
>>
> Hi,
>     Aaron is right (thanks), it's the xmloutput plugin. (sorry!)
>     I just fixed it in trunk. A new tarball soon :)

I recommend you using **kwargs for all commands your plugin overrides.
And when you're run underlying bzr command just pass this **kwargs
to it run() method. Something like this:

class cmd_version(builtins.cmd_version):

     __doc__ = builtins.cmd_version.__doc__

     def run(self, **kwargs):
         return builtins.cmd_version.run(self, **kwargs)

In this case you don't need to update your plugin every time in trivial cases
like this one. I use such approach in my gzipped_bundle plugin, because
I override pull, merge and bundle commands and they often change signatures.



More information about the bazaar mailing list