patchupdate.py: Allow both old and new GitHub URLs.

This commit is contained in:
Zebediah Figura 2018-03-27 18:30:38 -05:00
parent e50f0488cc
commit f7ba182039

View File

@ -68,7 +68,7 @@ class config(object):
bugtracker_user = None
bugtracker_pass = None
github_url = "https://github.com/wine-compholio/wine-staging"
github_url = "https://github.com/wine-staging/wine-staging"
class PatchUpdaterError(RuntimeError):
"""Failed to update patches."""
@ -420,7 +420,7 @@ def check_bug_status(all_patches, sync_bugs=False):
once = True
for bug in bug_list['bugs']:
if bug['status'] != "STAGED" or bug['cf_staged_patchset'] != url_map[bug['id']]:
if bug['status'] != "STAGED":
if once:
print ""
print "WARNING: The following bugs might require attention:"
@ -430,6 +430,10 @@ def check_bug_status(all_patches, sync_bugs=False):
bug['resolution'], bug['cf_staged_patchset'])
if sync_bugs:
sync_bug_status(bugtracker, bug, url_map[bug['id']])
if bug['status'] == 'STAGED' and \
bug['cf_staged_patchset'] != url_map[bug['id']] and \
bug['cf_staged_patchset'] != url_map[bug['id']].replace('github.com/wine-staging','github.com/wine-compholio'):
print 'Invalid staged patchset: #%d - \"%s\" - %s' %(bug['id'], bug['summary'], bug['cf_staged_patchset'])
once = True
for bug in staged_bugs['bugs']: