From e34088a986b451741dd77cccc2725eec062d2b9c Mon Sep 17 00:00:00 2001 From: Jonathan Patrick Davies Date: Mon, 1 Sep 2008 23:12:38 +0100 Subject: [PATCH] * requestsync: Improve dup sync bug checking. --- requestsync | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/requestsync b/requestsync index 8db3805..b248943 100755 --- a/requestsync +++ b/requestsync @@ -97,16 +97,23 @@ def checkExistingReports(package): if len(pkgBugList) == 0: return # No bugs found. - for bug in pkgBugList: - # See if Please sync package is in the bug summary. - if ("Please sync %s" % package) in bug.summary: - print "A bug with the title: '%s' has been found on Launchpad." % bug.summary - print "Please see the following URL to verify this before filing a " \ - "duplicate report:" - print " -", bug.url - print "Press Ctrl-C to stop filing the bug report now, otherwise " \ - "please press enter." - raw_input_exit_on_ctrlc() + matchingBugs = [bug for bug in pkgBugList if "Please sync %s" % + package in bug.summary] + + if len(matchingBugs) == 0: + return # No sync bugs found. + + print "The following bugs could be possible duplicate sync bug(s) on Launchpad:" + + for bug in matchingBugs: + print " *", bug.summary + print " -", bug.url + + print "Please check out the above URLs to verify this before filing a " \ + "duplicate report." + print "Press Ctrl-C to stop filing the bug report now, otherwise " \ + "please press enter." + raw_input_exit_on_ctrlc() def cur_version_component(sourcepkg, release): '''Determine current package version in ubuntu.'''