BZR_PLUGINS_AT can be fooled by os.listdir order

Bug #552922 reported by Gordon Tyler on 2010-03-31
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Critical
Vincent Ladeuil

Bug Description

I'm trying to use the BZR_PLUGINS_AT env var with bzr.dev to work on a branch of bzr-explorer, on Windows 7. I set BZR_PLUGINS_AT like so:

C:\dev\bzr-explorer\sidebar-location-selector>set BZR_PLUGINS_AT=explorer@C:\dev\bzr-explorer\sidebar-location-selector

However, the plugins command shows explorer is not loaded:

C:\dev\bzr-explorer\sidebar-location-selector>bzrdev plugins
colo 0.0.2
   Work with colocated branches using current technology.

email
   Sending emails for commits and branch changes.

explorer
   (no description)

fastimport 0.9.0dev
   FastImport Plugin

launchpad 2.2.0dev1
   Launchpad.net integration plugin for Bazaar.

netrc_credential_store 2.2.0dev1
   Use ~/.netrc as a credential store for authentication.conf.

news_merge 2.2.0dev1
   Merge hook for bzr's NEWS file.

pqm 1.3.0
   Functionality for controlling a Patch Queue Manager (pqm).

qbzr 0.18.5dev
   QBzr - Qt-based frontend for Bazaar

And attempting to use the explorer command gives an error:

C:\dev\bzr-explorer\sidebar-location-selector>bzrdev explorer
bzr: ERROR: unknown command "explorer"

I already have an older version of explorer in the plugins path.

Bazaar (bzr) 2.2.0dev1
  from bzr checkout C:/dev/bzr/bzr.dev
    revision: 5121
    revid: <email address hidden>
    branch nick: bzr.dev
  Python interpreter: C:\Python26\python.exe 2.6.4
  Python standard library: C:\Python26\lib
  Platform: Windows-post2008Server-6.1.7600
  bzrlib: C:\dev\bzr\bzr.dev\bzrlib
  Bazaar configuration: C:\Users\Owner\AppData\Roaming\bazaar\2.0
  Bazaar log file: C:\Users\Owner\Documents\.bzr.log

Related branches

Martin Pool (mbp) wrote :

> C:\dev\bzr-explorer\sidebar-location-selector>setBZR_PLUGINS_AT=explorer@C:\dev\bzr-explorer\sidebar-location-selector

I assume this is a typo and there is actually a space there?

Changed in bzr:
importance: Undecided → Medium
status: New → Confirmed
tags: added: plugin win32
Gordon Tyler (doxxx) wrote :

Correct.

description: updated
Vincent Ladeuil (vila) wrote :

_PluginImporter.load_module() is broken on all platforms.
It loads the first loadable .py file proposed by os.listdir() which may not be __init__.py, it can well be setup.py for example.
I marked the bug critical as it makes BZR_PLUGINS_AT unusable.

summary: - BZR_PLUGINS_AT doesn't work on Windows
+ BZR_PLUGINS_AT can be fooled by os.listdir order
Changed in bzr:
importance: Medium → Critical
assignee: nobody → Vincent Ladeuil (vila)
status: Confirmed → In Progress
assignee: Vincent Ladeuil (vila) → nobody
Robert Collins (lifeless) wrote :

Have you landed the fix vila?

Changed in bzr:
assignee: nobody → Vincent Ladeuil (vila)
Gordon Tyler (doxxx) wrote :

It's merged into bzr.dev but not 2.2.

Changed in bzr:
status: In Progress → Fix Committed
Robert Collins (lifeless) wrote :

There's a large merge to the 2.2 branch pending, I believe.

Changed in bzr:
status: Fix Committed → Fix Released
Vincent Ladeuil (vila) wrote :

I first proposed to merge against the 2.2 branch before realizing it wasn't in a state where I can land it.

I understand now that bzr.dev will be merged in 2.2 at one point where the entry for this bug may need to be fixed (it's in 2.2b1 right now which is wrong).

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers