BZR_PLUGIN_PATH should ignore trailiing slashes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Medium
|
Unassigned |
Bug Description
While getting Bug #129298 to work, I set my BZR_PLUGIN_PATH to C:\Program Files\Bazaar\
V:\Personal\
Unable to load plugin 'push_and_update' from 'C:\\Program Files\\
\\'
Unable to load plugin 'bzrtools' from 'C:\\Program Files\\
C:\Program Files\Bazaar\
It's not immediately obvious to me what's wrong there.
It would be nice if bzr ignored trailing slashes in the BZR_PLUGIN_PATH environment variable. Or, if we wanted to enfore correctness, which I'm fine with, it would be nice to print out the full path to the plugin we weren't able to load. i.e.
V:\Personal\
Unable to load plugin 'push_and_update' from 'C:\\Program Files\\
\\\\push_
Unable to load plugin 'bzrtools' from 'C:\\Program Files\\
C:\Program Files\Bazaar\
In that case, the quadrupled(!) slashes would have been a hint that I needed the remove the trailing slash from my environment variable.
Changed in bzr: | |
status: | Triaged → Fix Released |
Here's a sample patch. I know it's not good enough to check in, but I don't really know how to write an automated test for it.
Anyways, with this patch, I can set each of the elements of my BZR_PLUGIN_PATH to end with any number of trailing slashes, and running "python bzr plugins" will always succeed.