Enhance Bzr.version_cmp to handle non-numeric versions
authorMichel Alexandre Salim <salimma@fedoraproject.org>
Thu, 4 Aug 2011 15:50:32 +0000 (17:50 +0200)
committerW. Trevor King <wking@drexel.edu>
Thu, 8 Sep 2011 02:02:37 +0000 (22:02 -0400)
commita37004c5e4b80a775cbb43e2f25b3376ae1673c0
treec8cbf80dbffc4700772c7001716b063bf533a378
parent4889440b63b62e99366bb119fc63e2d960e51883
Enhance Bzr.version_cmp to handle non-numeric versions

bzr uses non-numeric tags to indicate prereleases; previously, this
triggers an exception in be's Bzr module as version comparison is only
supported between version strings that only contain numbers and dots.

This patch extends version_cmp to support a single non-numeric
pre-release string of arbitrary length (e.g. 'a', 'b', 'pre', 'rc'), and
extends the docstring tests to cover this extension.

Signed-off-by: Michel Alexandre Salim <salimma@fedoraproject.org>
libbe/storage/vcs/bzr.py