[RFC] Automatic Plugin Suggestion

Martin Albisetti argentina at gmail.com
Sat Feb 16 06:00:17 GMT 2008


This initial bit is just for checking if the command the user is
trying to run exists on as a "officially approved plugin", and will
output some helpful text to orientate the user on how to install it.
Eventually, it will tell the user the command it needs to run in order
to automagically install it, but that's phase 2 at the very least.

So, a little bit of history on my train of thought on the code
implementation (most of it was a back and forth of ideas with
Guillermo Gonzalez).
Initially I was going to allow/make each plugin offer it's own DB of
plugins, forcing them to reimplement the code basis for checking the
availability of a command and handling it correctly. This would
duplicate too much code and make the "official plugins" DB be
type-of-installer specific (debs, rpms, etc).
It seemed like too much of a hassle to maintain for each plugin a DB
and would make the term "official plugin" be much more blurry since it
would depend on each installer.
The actual idea of a plugin being official or not I think is a great
opportunity to incentive people to keep their code basis as clean and
bug-less as possible, and adhere to a list of requisites of quality
standards we would define.

What I'm attaching here is an attempt at the infrastructure to check
for the availability of a command within a plugin (leaving it hookable
if someone else wants to override it for some reason), and does not
know anything about other possible installers since we really don't
need to know at this point who/how it can installed.

I included some basic blackbox tests in it, but I'm out of ideas on
what other tests I can add.

It also needs some PEP8 love, but I'd like to know if I'm on the right
path before I put more work into this code.



Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plugin_suggestion.patch
Type: text/x-diff
Size: 19405 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080216/8e310540/attachment-0001.bin 


More information about the bazaar mailing list