Bug 1092149 - Use LooseVersion instead of StrictVersion in |mach mercurial-setup| so release candidates work, r=gps

This commit is contained in:
Andrew Halberstadt 2014-10-31 15:09:39 -04:00
parent b51aa7454f
commit dcafcc6e89
2 changed files with 7 additions and 7 deletions

View File

@ -8,7 +8,7 @@ import os
import re
import subprocess
from distutils.version import StrictVersion
from distutils.version import LooseVersion
def get_hg_version(hg):
"""Obtain the version of the Mercurial client."""
@ -21,4 +21,4 @@ def get_hg_version(hg):
if not match:
raise Exception('Unable to identify Mercurial version.')
return StrictVersion(match.group(1))
return LooseVersion(match.group(1))

View File

@ -11,7 +11,7 @@ import shutil
import sys
import which
from distutils.version import StrictVersion
from distutils.version import LooseVersion
from configobj import ConfigObjError
from StringIO import StringIO
@ -43,7 +43,7 @@ are up to date and you won't have to do anything.
To begin, press the enter/return key.
'''.strip()
OLDEST_NON_LEGACY_VERSION = StrictVersion('3.0')
OLDEST_NON_LEGACY_VERSION = LooseVersion('3.0')
LEGACY_MERCURIAL = '''
You are running an out of date Mercurial client (%s).
@ -109,7 +109,7 @@ Your Mercurial should now be properly configured and recommended extensions
should be up to date!
'''.strip()
REVIEWBOARD_MINIMUM_VERSION = StrictVersion('3.0.1')
REVIEWBOARD_MINIMUM_VERSION = LooseVersion('3.0.1')
REVIEWBOARD_INCOMPATIBLE = '''
Your Mercurial is too old to use the reviewboard extension, which is necessary
@ -129,7 +129,7 @@ functionality will not be enabled or you will be prompted for your
Bugzilla credentials when they are needed.
'''.lstrip()
BZPOST_MINIMUM_VERSION = StrictVersion('3.0')
BZPOST_MINIMUM_VERSION = LooseVersion('3.0')
BZPOST_INFO = '''
The bzpost extension automatically records the URLs of pushed commits to
@ -138,7 +138,7 @@ referenced Bugzilla bugs after push.
Would you like to activate bzpost
'''.strip()
FIREFOXTREE_MINIMUM_VERSION = StrictVersion('3.0')
FIREFOXTREE_MINIMUM_VERSION = LooseVersion('3.0')
FIREFOXTREE_INFO = '''
The firefoxtree extension makes interacting with the multiple Firefox