[MERGE][Trivial] invalid version tuple attempt to raise AssertionError fails with TypeError

John Arbash Meinel john at arbash-meinel.com
Wed Sep 24 02:57:43 BST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Robert Collins wrote:
> FWIW, bzrlib.plugin.PlugIn is what I'd tend to use in any plugin that
> wants version formatting.
> 
> -Rob

I'll note that if you do:

echo "version_info = (1, 2, 3, 'dev', 0)" >> test_plugin.py

$ bzr plugins
...
test_plugin 1.2.3dev0
    (no description)


So at least for getting a value for bzr to know the plugin, all you need is
the version_info tuple. (Which is done by the code Robert mentions.)

I realize that qbzr is special, in that it probably wants to format its
version on its own (and shove it in an About box, for example). Most other
plugins don't need to do so.

I'll further note that the way the Plugin code formats a version tuple is
*not* the way that _format_version_tuple() will format it. It is *close*, but
a while back Alexander requested that we use all dots (1.2.3.dev.0 rather than
1.2.3dev0).

We should probably consider updating the Plugin code.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFI2Z6XJdeBCYSNAAMRAqZkAJ9PqzVRxt42v43Xi/gkT0fBbt9kIACbB8Bf
NuzyvQrzrTqaRS7PqUoVVfM=
=6O6I
-----END PGP SIGNATURE-----



More information about the bazaar mailing list