$HOME/.bazaar/plugins Path Not Used by Default
Vincent Ladeuil
v.ladeuil+lp at free.fr
Sat Oct 16 08:08:00 BST 2010
>>>>> Tom Browder <tom.browder at gmail.com> writes:
> On Fri, Oct 15, 2010 at 09:25, John Arbash Meinel
> <john at arbash-meinel.com> wrote:
>> On 10/15/2010 7:37 AM, Tom Browder wrote:
>>> According to the bzr docs, on *nix, directory $BZR_HOME ($HOME/.bazaar
>>> by default), subdirectory "plugins" is, by default, searched for
>>> plugins--but that doesn't work for me (using bzr 2.2.1).
> ...
>> If you define BZR_PLUGIN_PATH then it overrides whatever default
>> $HOME/.bazaar/plugins directory.
> Okay, I see see that's true now--but I can't find that said in the
> docs (lots of docs, though).
>> I certainly use the latter directory all the time, across many versions
>> of bzr. Do you care to dig deeper into this?
> Yes, I would.
> IMHO, the $BZR_HOME/plugins directory ought to always be searched
> last, even if BZR_PLUGIN path is defined (unless the directory is
> already defined in BZR_PLUGIN_PATH). I use the BZR_PLUGIN_PATH for
> system-wide plugins (and I imagine others do, too) and of course user
> plugin conflicts may appear, but that is the user's problem.
Thanks for digging this subject !
So, here is the rationale as documented in the code:
# Ad-Hoc default: core is not overriden by site but user can overrides both
# The rationale is that:
# - 'site' comes last, because these plugins should always be available and
# are supposed to be in sync with the bzr installed on site.
# - 'core' comes before 'site' so that running bzr from sources or a user
# installed version overrides the site version.
# - 'user' comes first, because... user is always right.
# - the above rules clearly defines which plugin version will be loaded if
# several exist. Yet, it is sometimes desirable to disable some directory
# so that a set of plugins is disabled as once. This can be done via
# -site, -core, -user.
'site' is not clearly defined across all the platforms, on windows in
particular we didn't reach an agreement on how it should be implemented
in the windows installer and even on *nix things are a bit blurry.
But in any case, BZR_PLUGIN_PATH gives full control to the user.
If you can find a better way to describe this in the doc, a patch will
be be warmly welcome.
Vincent
More information about the bazaar
mailing list