lp-mark-bugs-released revision ac4dc8c32116eb4089277fd2ef8c3e4700a429a2
9ffbbce6a624b6051b3d001edcbad1e02c69bd45Andreas Gustafsson# Copyright (c) 2010 Canonical Ltd.
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# This program is free software; you can redistribute it and/or modify it
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# under the terms of the GNU General Public License version 3 as published
9ffbbce6a624b6051b3d001edcbad1e02c69bd45Andreas Gustafsson# by the # Free Software Foundation
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# lp-mark-bugs-released is distributed in the hope that it will be useful, but
83a28ca274521e15086fc39febde507bcc4e145eMark Andrews# WITHOUT ANY WARRANTY; without even the implied warranty of
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# General Public License for more details.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein'''Mark bugs that are Fix Committed on a release to be Fix Released'''
194e2dfffa6a167b8eef0ad11864026b423a1c30Mark Andrews print "Marking bug " + str(bug.bug.id) + " as 'Fix Released'"
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein print >> sys.stderr, '''Mark bugs 'Fix Committed' on a release as released
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Usage: %s <project name> <version>''' % sys.argv[0]
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein launchpad = Launchpad.login_with('ubuntu-dev-tools', 'production')
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein print >> sys.stderr, 'Could not connect to Launchpad:', str(error)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein # Look up the project using the Launchpad instance.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein # Find the release in the project's releases collection.
9ffbbce6a624b6051b3d001edcbad1e02c69bd45Andreas Gustafsson print >> sys.stderr, '''Unable to find release: %s''' % version
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein # Mark any fix committed bugs released
9ffbbce6a624b6051b3d001edcbad1e02c69bd45Andreas Gustafsson for task in release.milestone.searchTasks(status="Fix Committed"):
9ffbbce6a624b6051b3d001edcbad1e02c69bd45Andreas Gustafsson if othertask.milestone.name == release.milestone.name:
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein print 'An error happened in the upload: %s\n%s' %(