mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-05-15 10:51:28 +00:00
Don't look for bugs closed in Debian changes, only close bugs mentioned on the command line
This commit is contained in:
parent
59b69d3767
commit
2b074fb581
33
syncpackage
33
syncpackage
@ -368,14 +368,6 @@ def copy(src_pkg, release, bugs, simulate=False, force=False):
|
|||||||
changes = getDebianChangelog(debian_spph, base_version).strip()
|
changes = getDebianChangelog(debian_spph, base_version).strip()
|
||||||
if changes:
|
if changes:
|
||||||
Logger.normal("New Changes:\n%s", changes)
|
Logger.normal("New Changes:\n%s", changes)
|
||||||
bugs += bugs_from_changes(changes)
|
|
||||||
bugs = sorted(set(bugs))
|
|
||||||
else:
|
|
||||||
Logger.error("Unable to determine changes, Launchpad bugs closed in "
|
|
||||||
"the changelog will not be closed. ")
|
|
||||||
Logger.error("To close them manually, use the --bug option")
|
|
||||||
Logger.normal("LP Bugs to be closed: %s",
|
|
||||||
', '.join(str(bug) for bug in bugs))
|
|
||||||
|
|
||||||
if simulate:
|
if simulate:
|
||||||
return
|
return
|
||||||
@ -400,11 +392,15 @@ def copy(src_pkg, release, bugs, simulate=False, force=False):
|
|||||||
|
|
||||||
Logger.normal('Request succeeded; you should get an e-mail once it is '
|
Logger.normal('Request succeeded; you should get an e-mail once it is '
|
||||||
'processed.')
|
'processed.')
|
||||||
Logger.normal('Please wait for the sync to be successuful before '
|
bugs = sorted(set(bugs))
|
||||||
'closing bugs')
|
if bugs:
|
||||||
answer = YesNoQuestion().ask("Close bugs?", "yes")
|
Logger.normal("LP Bugs to be closed: %s",
|
||||||
if answer == "yes":
|
', '.join(str(bug) for bug in bugs))
|
||||||
close_bugs(bugs, src_pkg.source, src_pkg.version.full_version, changes)
|
Logger.normal('Please wait for the sync to be successuful before '
|
||||||
|
'closing bugs')
|
||||||
|
answer = YesNoQuestion().ask("Close bugs?", "yes")
|
||||||
|
if answer == "yes":
|
||||||
|
close_bugs(bugs, src_pkg.source, src_pkg.version.full_version, changes)
|
||||||
|
|
||||||
def is_blacklisted(query):
|
def is_blacklisted(query):
|
||||||
""""Determine if package "query" is in the sync blacklist
|
""""Determine if package "query" is in the sync blacklist
|
||||||
@ -431,17 +427,6 @@ def is_blacklisted(query):
|
|||||||
applicable_comments.append(comment)
|
applicable_comments.append(comment)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def bugs_from_changes(changes):
|
|
||||||
"""Return a list of all LP bugs closed by changes"""
|
|
||||||
# From sync-source.py:
|
|
||||||
re_lp_closes = re.compile(r"lp:\s+\#\d+(?:,\s*\#\d+)*", re.I)
|
|
||||||
re_bug_numbers = re.compile(r"\#?\s?(\d+)")
|
|
||||||
closes = []
|
|
||||||
for match in re_lp_closes.finditer(changes):
|
|
||||||
bug_match = re_bug_numbers.findall(match.group(0))
|
|
||||||
closes.extend(map(int, bug_match))
|
|
||||||
return closes
|
|
||||||
|
|
||||||
def close_bugs(bugs, package, version, changes):
|
def close_bugs(bugs, package, version, changes):
|
||||||
"""Close the correct task on all bugs, with changes"""
|
"""Close the correct task on all bugs, with changes"""
|
||||||
ubuntu = Launchpad.distributions['ubuntu']
|
ubuntu = Launchpad.distributions['ubuntu']
|
||||||
|
Loading…
x
Reference in New Issue
Block a user