[MERGE] new formatting of `bzr plugins` output.
John Arbash Meinel
john at arbash-meinel.com
Mon Jan 21 15:37:40 GMT 2008
Alexander Belchenko wrote:
> I rework formatting of `bzr plugins` output.
> Now I think it's much better for eyes of human beings.
>
> Before:
>
> C:\work\Bazaar\mydev.packs\bzr.dev>python bzr plugins
> work\Bazaar\mydev.packs\bzr.dev\bzrlib\plugins\launchpad [unknown]
> Launchpad.net integration plugin for Bazaar.
> work\Bazaar\plugins-repo\bzrtools [1.1.0]
> Various useful plugins for working with bzr.
> C:\work\Bazaar\plugins-repo\win32symlinks [0.92.0]
> Fake symlinks support for win32 (NOTE: slow on FAT32!)
> C:\work\Bazaar\mydev.packs\bzr.dev\bzrlib\plugins\multiparent.pyc [unknown]
> Implementation of multiparent diffs for versionedfile-like storage
>
> Now:
>
> C:\work\Bazaar\mydev.packs\plugins.output>python bzr plugins
> bzrtools 1.1.0 Various useful plugins for working with bzr.
> C:\work\Bazaar\plugins-repo\bzrtools
> launchpad Launchpad.net integration plugin for Bazaar.
>
> C:\work\Bazaar\mydev.packs\plugins.output\bzrlib\plugins\launchpad
> multiparent Implementation of multiparent diffs for
> versionedfile-like storage
>
> C:\work\Bazaar\mydev.packs\plugins.output\bzrlib\plugins\multiparent.py
> win32symlinks 0.92.0 Fake symlinks support for win32 (NOTE: slow on
> FAT32!)
> C:\work\Bazaar\plugins-repo\win32symlinks
>
>
> Also for python modules plugins (like multiparent.py) plugins.path()
> now returns path to python source file (*.py) instead of compiled
> bytecode (*.pyc).
>
I do find it easier to read, though I find this even better:
bzrtools 1.1.0
Various useful plugins for working with bzr.
C:\work\Bazaar\plugins-repo\bzrtools
launchpad
Launchpad.net integration plugin for Bazaar.
C:\work\Bazaar\mydev.packs\plugins.output\bzrlib\plugins\launchpad
multiparent
Implementation of multiparent diffs for versionedfile-like storage
C:\work\Bazaar\mydev.packs\plugins.output\bzrlib\plugins\multiparent.py
win32symlinks 0.92.0
Fake symlinks support for win32 (NOTE: slow on FAT32!)
C:\work\Bazaar\plugins-repo\win32symlinks
The only problem with automatically changing ".py[co]" => ".py" is that
there may not *be* a .py. One could certainly ship your plugins as
precompiled .pyo modules with all the docstrings, etc stripped out. So
if we do it, we probably should use "os.path.isfile()" to make sure it
really is present.
Also, I'm not sure how it would work if the .pyc file was in a .zip archive.
BB:tweak
John
=:->
More information about the bazaar
mailing list