mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-13 08:01:09 +00:00
* requestsync: Check for already existing sync requests before filing a new
one.
This commit is contained in:
parent
cbfdaaea55
commit
806beacb51
2
debian/changelog
vendored
2
debian/changelog
vendored
@ -9,6 +9,8 @@ ubuntu-dev-tools (0.43ubuntu2) UNRELEASED; urgency=low
|
||||
- Wrapped Depends line and bumped debhelper build-dependency version to 6.
|
||||
* debian/compat: Changed to 6.
|
||||
* Moved https_proxy dropping code to common.py.
|
||||
* requestsync: Check for already existing sync requests before filing a new
|
||||
one.
|
||||
|
||||
-- Colin Watson <cjwatson@ubuntu.com> Mon, 01 Sep 2008 09:48:38 +0100
|
||||
|
||||
|
@ -138,4 +138,7 @@ def main():
|
||||
sys.exit(0)
|
||||
|
||||
if __name__ == "__main__":
|
||||
try:
|
||||
main()
|
||||
except KeyboardInterrupt:
|
||||
print "Operation was interrupted by user."
|
||||
|
31
requestsync
31
requestsync
@ -73,7 +73,7 @@ def checkNeedsSponsorship(component):
|
||||
"the '%s'\nteam, who shall be subscribed to this bug report." % sponsor
|
||||
print "This must be done before it can be processed by a member of " \
|
||||
"the Ubuntu Archive team."
|
||||
print "Should the above be incorrect, please press Control-C now to " \
|
||||
print "Should the above be incorrect, please press Ctrl-C now to " \
|
||||
"stop this script now\nand check the cookie file at:", launchpad_cookiefile
|
||||
raw_input_exit_on_ctrlc() # Abort if necessary.
|
||||
return True # Sponsorship required.
|
||||
@ -81,6 +81,33 @@ def checkNeedsSponsorship(component):
|
||||
# Is a team member, no sponsorship required.
|
||||
return False
|
||||
|
||||
def checkExistingReports(package):
|
||||
""" Check existing bug reports on Launchpad for a possible sync request.
|
||||
|
||||
If found ask for confirmation on filing a request.
|
||||
"""
|
||||
import launchpadbugs.connector as Connector
|
||||
|
||||
# Connect to the bug list.
|
||||
bugList = Connector.ConnectBugList()
|
||||
|
||||
# Fetch the package bug list from Launchpad.
|
||||
pkgBugList = bugList("https://bugs.launchpad.net/ubuntu/+source/%s" % 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()
|
||||
|
||||
def cur_version_component(sourcepkg, release):
|
||||
'''Determine current package version in ubuntu.'''
|
||||
madison = subprocess.Popen(['rmadison', '-u', 'ubuntu', '-a', 'source', \
|
||||
@ -451,6 +478,8 @@ if __name__ == '__main__':
|
||||
print 'The versions in Debian and Ubuntu are the same already (%s). Aborting.' % (deb_version,)
|
||||
sys.exit(1)
|
||||
|
||||
checkExistingReports(srcpkg)
|
||||
|
||||
# generate bug report
|
||||
subscribe = 'ubuntu-archive'
|
||||
status = 'confirmed'
|
||||
|
Loading…
x
Reference in New Issue
Block a user