$HOME/.bazaar/plugins Path Not Used by Default

Tom Browder tom.browder at gmail.com
Fri Oct 15 20:57:25 BST 2010


On Fri, Oct 15, 2010 at 11:39, Vincent Ladeuil <v.ladeuil+lp at free.fr> wrote:
>>>>>> Tom Browder <tom.browder at gmail.com> writes:
>
>    > 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).
>
> Which doc are you referring to ?
>
> http://doc.bazaar.canonical.com/bzr.dev/en/user-reference/configuration-help.html

I've been using the stable docs.  Here are some definitions and
explanations that have confused me in the User Reference:

<quote>
BZR_HOME Override the home directory used by Bazaar.
</quote>

Where is the default home directory defined?  I found it implicitly
defined in the User Guide:

<quote>
How to install a plugin

Installing a plugin is very easy! If not already created, create a
plugins directory under your Bazaar configuration directory,
~/.bazaar/ on Unix and C:\Documents and
Settings\<username>\Application Data\Bazaar\2.0\ on Windows. Within
this directory (referred to as $BZR_HOME below), each plugin is placed
in its own subdirectory.

...

When installing plugins, the directories that you install them in must
be valid python identifiers. This means that they can only contain
certain characters, notably they cannot contain hyphens (-). Rather
than installing bzr-gtk to $BZR_HOME/plugins/bzr-gtk, install it to
$BZR_HOME/plugins/gtk.
</quote>

Which directory is BZR_HOME, "~/.bazaar" or "~/.bazaar/plugins"?  The
last paragraph implies it's $HOME/.bazaar, but that doesn't work for
me with bzr 2.2.l when I put $BZR_HOME/plugins in BZR_PLUGIN_PATH.

> explains all the details about BZR_PLUGIN_PATH.

Going back to the User Reference:

<quote>
BZR_PLUGIN_PATH

The path to the plugins directory that Bazaar should use. If not set,
Bazaar will search for plugins in:

    * the user specific plugin directory (containing the user plugins),
    * the bzrlib directory (containing the core plugins),
    * the site specific plugin directory if applicable (containing the
site plugins).

If BZR_PLUGIN_PATH is set in any fashion, it will change the the way
the plugin are searched.
</quote>

My bad: I failed to notice the complete definition here because I was
interested in system-wide setting and hadn't gotten to personal
plugins.  When Neil gave the personal plugin code and I installed it,
I didn't realize my $HOME/.bazaar/plugins would not be looked at.

<quote>
Note that the special values ‘user’, ‘core’ and ‘site’ should be used
literally, they will be substituted by the corresponding, platform
specific, values.
</quote>

The variable 'user' is kind of vaguely defined in the User Guide, but
where is the variable ‘site’ defined?  They should be defined here
more definitively IMHO.

I am probably missing some other docs, but I do have my setup working
at the moment thanks to John and Vincent pointing out the
BZR_PLUGIN_PATH setting details.

Thanks again.

Regards,

-Tom



More information about the bazaar mailing list