Comment 10 for bug 82693


Having a better solution for this would be great, but with the help of
jam and vila I just knocked this up:

    if __name__ == '__main__':
       import os
       import subprocess
       import sys
       dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "plugins")
       retcode ="bzr selftest -s bzrlib.plugins.<plugin name>",
               shell=True, env={"BZR_PLUGIN_PATH": dir})

Put that at the top of (before any "import bzrlib.plugins.<plugin name>"
type imports), with a symlink in the branch that points

   ./plugins/<plugin name> -> ./

so that it is loaded under the correct name. The "python" will run the

This obviously doesn't work on windows, so it's not good for wide adoption.