Do not reopen closed bugs due to bug mentions
Do not let update_bug.py reopen a FixCommitted or FixReleased bug just because the bug number was mentioned in a commit message. In most cases that mention is just a simple reference to a closed bug. In the rare cases the committer actually wanted to reopen a closed bug, he should rather have open a specific bug about it anyway. Fixes bug 1078745 Change-Id: I513e6fc73d6bab02de21628e55a5d28189834632 Reviewed-on: https://review.openstack.org/16080 Reviewed-by: Monty Taylor <mordred@inaugust.com> Reviewed-by: Jeremy Stanley <fungi@yuggoth.org> Approved: James E. Blair <corvus@inaugust.com> Reviewed-by: James E. Blair <corvus@inaugust.com> Tested-by: Jenkins
This commit is contained in:
@@ -138,6 +138,7 @@ def process_bugtask(launchpad, bugtask, git_log, args):
|
|||||||
if is_direct_release(args.project):
|
if is_direct_release(args.project):
|
||||||
set_fix_released(bugtask)
|
set_fix_released(bugtask)
|
||||||
else:
|
else:
|
||||||
|
if bugtask.status != u'Fix Released':
|
||||||
set_fix_committed(bugtask)
|
set_fix_committed(bugtask)
|
||||||
elif args.branch == 'milestone-proposed':
|
elif args.branch == 'milestone-proposed':
|
||||||
release_fixcommitted(bugtask)
|
release_fixcommitted(bugtask)
|
||||||
@@ -145,7 +146,8 @@ def process_bugtask(launchpad, bugtask, git_log, args):
|
|||||||
series = args.branch[7:]
|
series = args.branch[7:]
|
||||||
# Look for a related task matching the series
|
# Look for a related task matching the series
|
||||||
for reltask in bugtask.related_tasks:
|
for reltask in bugtask.related_tasks:
|
||||||
if reltask.bug_target_name.endswith("/" + series):
|
if (reltask.bug_target_name.endswith("/" + series) and
|
||||||
|
reltask.status != u'Fix Released'):
|
||||||
# Use fixcommitted if there is any
|
# Use fixcommitted if there is any
|
||||||
set_fix_committed(reltask)
|
set_fix_committed(reltask)
|
||||||
break
|
break
|
||||||
@@ -159,11 +161,14 @@ def process_bugtask(launchpad, bugtask, git_log, args):
|
|||||||
|
|
||||||
if args.hook == "patchset-created":
|
if args.hook == "patchset-created":
|
||||||
if args.branch == 'master':
|
if args.branch == 'master':
|
||||||
set_in_progress(bugtask, launchpad, args.uploader, args.change_url)
|
if bugtask.status not in [u'Fix Committed', u'Fix Released']:
|
||||||
|
set_in_progress(bugtask, launchpad, args.uploader,
|
||||||
|
args.change_url)
|
||||||
elif args.branch.startswith('stable/'):
|
elif args.branch.startswith('stable/'):
|
||||||
series = args.branch[7:]
|
series = args.branch[7:]
|
||||||
for reltask in bugtask.related_tasks:
|
for reltask in bugtask.related_tasks:
|
||||||
if reltask.bug_target_name.endswith("/" + series):
|
if (reltask.bug_target_name.endswith("/" + series) and
|
||||||
|
reltask.status not in [u'Fix Committed', u'Fix Released']):
|
||||||
set_in_progress(reltask, launchpad,
|
set_in_progress(reltask, launchpad,
|
||||||
args.uploader, args.change_url)
|
args.uploader, args.change_url)
|
||||||
break
|
break
|
||||||
|
|||||||
Reference in New Issue
Block a user