suggested patch for version checking in bzrtools and gtk plugins
Elliot Murphy
elliot at canonical.com
Wed Jun 6 19:31:26 BST 2007
Hi John,
On 06/06/2007 12:04 PM, John Arbash Meinel wrote:
>> For gtk:
>> === modified file '__init__.py'
>> --- __init__.py 2007-05-19 16:21:10 +0000
>> +++ __init__.py 2007-06-06 14:49:02 +0000
>> @@ -45,7 +45,13 @@
>> warning('bzr-gtk is not up to date with installed bzr version %s.'
>> ' \nThere should be a newer version available, e.g. %i.%i.'
>> % (bzrlib.__version__, bzrlib_version[0], bzrlib_version[1]))
>> - if bzrlib_version != desired_plus:
>> + if bzrlib_version == desired_plus:
>> + # allow people to run the next dev version without spewing warnings
>> + if bzrlib.version_info[3] != "dev":
>> + warning('bzr-gtk is not up to date with installed bzr version %s.'
>> + ' \nThere should be a newer version available, e.g. %i.%i.'
>> + % (bzrlib.__version__, bzrlib_version[0], bzrlib_version[1]))
>> + else:
>> raise Exception, 'Version mismatch'
>
> ^- I think you forgot to delete the existing warning before the version check.
You're absolutely right. Attached an updated patch for the gtk plugin.
I'm actually not seeing the version warning now, not sure why that is,
I'll have to take a closer look later on.
>
> Otherwise I agree that these would be good to include (though I do not
> specifically develop on those projects).
>
> I'm curious how the helper in bzrlib should look like. So far I see:
>
> 1) Ability to check whether the versions match, and issue a warning if there is
> a problem.
The plugins currently also refuse to load if the plugin version is newer
than the bzr version, or if the bzr version is more than one version
ahead of the plugin version.
>
> 2) Ability to not warn if the versions are "close" and both sides are "dev"
> versions.
I'm currently only checking if bzr is a "dev" version, I don't know that
the plugins currently mark themselves as dev versions.
>
> 3) Some way of manually disabling the warning, possibly for a specific plugin +
> version pair. (Or maybe just disabling them altogether). (For users who know
> that 0.17 is compatible with 0.18, and would you please stop annoying me TYVM)
That would be nice, but I think this would be useful even if it did not
support 3).
--
Elliot Murphy | https://launchpad.net/~emurphy/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bzr-gtk-versioning.patch
Type: text/x-patch
Size: 1048 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070606/770e22a6/attachment.bin
More information about the bazaar
mailing list