Merge "Add some logging to notify_impact."
diff --git a/jeepyb/cmd/update_bug.py b/jeepyb/cmd/update_bug.py
index 807aa46..43bd6c2 100644
--- a/jeepyb/cmd/update_bug.py
+++ b/jeepyb/cmd/update_bug.py
@@ -206,6 +206,7 @@
"""Apply changes to lp bug tasks, based on hook / branch."""
bugtask = task.lp_task
+ series = None
if args.hook == "change-abandoned":
add_change_abandoned_message(bugtask, args.change_url,
@@ -223,11 +224,13 @@
set_fix_committed(bugtask)
elif args.branch.startswith('proposed/'):
release_fixcommitted(bugtask)
- elif args.branch.startswith('stable/'):
- series = args.branch[7:]
+ else:
+ series = args.branch.rsplit('/', 1)[-1]
+
+ if series:
# Look for a related task matching the series.
for reltask in bugtask.related_tasks:
- if (reltask.bug_target_name.endswith("/" + series) and
+ if (reltask.bug_target_name.endswith(series) and
reltask.status != u'Fix Released' and
task.needs_change('set_fix_committed')):
set_fix_committed(reltask)
@@ -248,10 +251,13 @@
task.needs_change('set_in_progress')):
set_in_progress(bugtask, launchpad,
args.uploader, args.change_url)
- elif args.branch.startswith('stable/'):
- series = args.branch[7:]
+ else:
+ series = args.branch.rsplit('/', 1)[-1]
+
+ if series:
+ # Look for a related task matching the series.
for reltask in bugtask.related_tasks:
- if (reltask.bug_target_name.endswith("/" + series) and
+ if (reltask.bug_target_name.endswith(series) and
task.needs_change('set_in_progress') and
reltask.status not in [u'Fix Committed',
u'Fix Released']):