зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1157302 - [mozbase] Ignore unrecognized version strings when generating changelogs in versioninfo.py, DONTBUILD, r=armenzg
--HG-- extra : rebase_source : e1038d7ea1ac7cc9c23b570103e9aae97e04346e
This commit is contained in:
Родитель
998752462f
Коммит
fe95342cec
|
@ -43,9 +43,15 @@ def changelog(args):
|
|||
plus_version = None
|
||||
for line in diff.splitlines():
|
||||
if line.startswith('-PACKAGE_VERSION'):
|
||||
try:
|
||||
minus_version = StrictVersion(line.split()[-1].strip('"\''))
|
||||
except ValueError:
|
||||
pass
|
||||
elif line.startswith('+PACKAGE_VERSION'):
|
||||
try:
|
||||
plus_version = StrictVersion(line.split()[-1].strip('"\''))
|
||||
except ValueError:
|
||||
break
|
||||
|
||||
# make sure the change isn't a backout
|
||||
if not minus_version or plus_version > minus_version:
|
||||
|
@ -54,6 +60,7 @@ def changelog(args):
|
|||
|
||||
if StrictVersion(v) == plus_version:
|
||||
return rev
|
||||
|
||||
print("Could not find %s revision for version %s." % (args.module, v or 'latest'))
|
||||
sys.exit(1)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче