Ignore inconsistencies due to 'enhancement' severity change removal

https://bugzilla.mozilla.org/show_bug.cgi?id=1541362
This commit is contained in:
Marco Castelluccio 2019-04-03 17:36:43 +02:00
Родитель 55db7146b6
Коммит 042b2aaacb
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -315,7 +315,8 @@ def rollback(bug, when, verbose=True, all_inconsistencies=False):
if field in bug and not is_email(bug[field]):
if bug[field] != new_value:
# TODO: try to remove the cf_ part when https://bugzilla.mozilla.org/show_bug.cgi?id=1508695 is fixed.
if not all_inconsistencies and (any(field.startswith(k) for k in ['cf_']) or bug['id'] in [1304729, 1304515, 1312722, 1337747]) or (field == 'url' and bug['id'] == 740223):
# The 'enhancement' severity has been removed, but it doesn't show up in the history.
if not all_inconsistencies and ((any(field.startswith(k) for k in ['cf_']) or bug['id'] in [1304729, 1304515, 1312722, 1337747]) or (field == 'url' and bug['id'] == 740223) or (field == 'severity' and new_value == 'enhancement')):
print(f'Current value for field {field} of {bug["id"]}:\n{bug[field]}\nis different from previous value:\n{new_value}')
else:
assert False, f'Current value for field {field} of {bug["id"]}:\n{bug[field]}\nis different from previous value:\n{new_value}'