[RFC] Automatic Plugin Suggestion

Martin Albisetti argentina at gmail.com
Sat Mar 1 20:43:41 GMT 2008


On Sat, Mar 1, 2008 at 11:01 AM, Alexander Belchenko <bialix at ukr.net> wrote:
> === modified file 'bzrlib/plugin.py'
>  --- bzrlib/plugin.py    2008-02-20 10:36:15 +0000
>  +++ bzrlib/plugin.py    2008-02-29 18:26:10 +0000
>  @@ -41,7 +41,7 @@
>
>   from bzrlib import (
>       config,
>  -    osutils,
>  +    osutils

^ Fixed this. Don't know why I did it...  :/

Thanks.


>  === added file 'bzrlib/plugins/command_not_found/plugin_db.py'
>  --- bzrlib/plugins/command_not_found/plugin_db.py       1970-01-01 00:00:00 +0000
>  +++ bzrlib/plugins/command_not_found/plugin_db.py       2008-03-01 02:31:19 +0000
>  @@ -0,0 +1,8 @@
>  +rebase = {'name':'rebase', 'version':[0,4,1], 'url':'http://bazaar-vcs.org/Rebase',
>  'description':'The Bazaar rebase plugin provides support for rebasing  branches much like git-rebase
>  does in git. It adds the command "rebase" to Bazaar. When conflicts occur when replaying patches,
>  the user can resolve the conflict and continue the rebase using the "rebase-continue" command or
>  abort using the "rebase-abort" command.', 'commands':['rebase','rebase-continue','rebase-abort']}
>
>
>  ^-- and the rest of this file: please cut lines at 79-80 characters margin.
>  PEP-8.

I left that out intentionally. Since this file will be autogenerated,
I'm not sure we will be able to make it pep-8 compliant.


>  In general I'm resistant to this approach (put plugins db to built-in plugin) because
>  of my latest changes to bzr.exe. It should be the part of bzrlib, it should not be
>  another plugin, I think. You make it deeply plugable into command-line framework,
>  so I don't think it's a good idea to split this mechanics in this way.

In essence it would part of the core, yes. I don't mind either
approach, and since it's not too much work to move it in the core, and
the general consensus was for it to be a plugin, I went down this
path. I wouldn't mind moving it into the core if you can convince
everyone else  ;)


I've added a few fields to the DB since I sent this patch (like what
version of bzr the plugin is compatible with), and started to look
into how the plugin installer would look like.


Thanks for the review.

Martin



More information about the bazaar mailing list