From 12329170f12ca88029a52d8c3faa03a13868a5f5 Mon Sep 17 00:00:00 2001 From: Stefano Rivera Date: Wed, 21 Dec 2011 23:18:22 +0200 Subject: [PATCH] syncpackage: Mention sponsorship when closing bugs (LP: #904288) --- debian/changelog | 1 + syncpackage | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index eaa2cce..cc46cc1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,7 @@ ubuntu-dev-tools (0.138) UNRELEASED; urgency=low * mk-sbuild: Don't install devscripts by default (LP: #904502) * backportpackage: Add --release-pocket option, rather than relying entirely on heuristics (Closes: #651546) + * syncpackage: Mention sponsorship when closing bugs (LP: #904288) -- Stefano Rivera Wed, 21 Dec 2011 22:43:13 +0200 diff --git a/syncpackage b/syncpackage index 31701a3..826d5f6 100755 --- a/syncpackage +++ b/syncpackage @@ -429,7 +429,7 @@ def copy(src_pkg, release, bugs, sponsoree=None, simulate=False, force=False): answer = YesNoQuestion().ask("Close bugs", "yes") if answer == "yes": close_bugs(bugs, src_pkg.source, src_pkg.version.full_version, - changes) + changes, sponsoree) def is_blacklisted(query): @@ -471,11 +471,14 @@ def is_blacklisted(query): return (blacklisted, comments) -def close_bugs(bugs, package, version, changes): +def close_bugs(bugs, package, version, changes, sponsoree): """Close the correct task on all bugs, with changes""" ubuntu = Launchpad.distributions['ubuntu'] message = ("This bug was fixed in the package %s - %s" % (package, version)) + if sponsoree: + message += '\nSponsored for %s (%s)' % (sponsoree.display_name, + sponsoree.name) if changes: message += "\n\n---------------\n" + changes for bug in bugs: