[MERGE] Fix for Bug 129299, BZR_PLUGIN_PATH should ignore trailiing slashes.

Blake Winton bwinton at latte.ca
Thu Aug 9 18:28:14 BST 2007


John Arbash Meinel wrote:
> Blake Winton wrote:
>> Robert Collins wrote:
>>> Couple of things. If load_from_path is now accepting paths with '/',
>>> then you shouldn't need to santise BZR_PLUGINS_PATH - the lower level
>>> check will suffice.
>> I thought that, but set_plugins_path seems to get called from
>> __init__.py without a following call to load_from_path.
>>
>> BZR_PLUGIN_PATH is also honoured for any plugins imported via
>> 'import bzrlib.plugins.PLUGINNAME', as long as set_plugins_path has been
>> called.
>>
> The reason we set plugins.__path__ is explicitly so that plugins can do
> "from bzrlib.plugins.other_plugin import x". So yeah, I would make sure
> that the __path__ variable is correct.
> 
> In fact, it would be reasonable to just assert it is correct in
> load_from_path, rather than sanitizing it again. (I'm fine with doing
> either, but we should have __path__ be correct.)

Okay, I've left the extra sanitize in, and added a comment in the code. 
  Here's the latest version of the bundle.

Anything else I can do?  Should I strip the intermediate revisions out 
of the bundle (like the one where I forgot to set my editor to use plain 
LFs as line endings, so it saved a bunch of CR-LFs)?

Later,
Blake.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: plugin_path2.patch
Type: text/x-patch
Size: 17278 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070809/c015be17/attachment.bin 


More information about the bazaar mailing list