syncpackage: Mention sponsorship when closing bugs (LP: #904288)

This commit is contained in:
Stefano Rivera 2011-12-21 23:18:22 +02:00
parent 9e1a6f6ff9
commit 12329170f1
2 changed files with 6 additions and 2 deletions

1
debian/changelog vendored
View File

@ -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 <stefanor@debian.org> Wed, 21 Dec 2011 22:43:13 +0200

View File

@ -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: