merge with upstream

This commit is contained in:
Brian Murray 2011-04-19 12:41:30 -07:00
commit c38452bb43
3 changed files with 25 additions and 7 deletions

14
debian/changelog vendored
View File

@ -1,4 +1,12 @@
ubuntu-dev-tools (0.121) UNRELEASED; urgency=low
ubuntu-dev-tools (0.122) UNRELEASED; urgency=low
[ Ted Gould ]
* lp-project-upload: Add an optional parameter for creating a new
milestone to add future bugs to.
-- Ted Gould <ted@ubuntu.com> Tue, 19 Apr 2011 17:32:03 +0200
ubuntu-dev-tools (0.121) unstable; urgency=low
[ Daniel Holbach ]
* harvest, setup.py: install tool that queries Harvest for information
@ -17,7 +25,7 @@ ubuntu-dev-tools (0.121) UNRELEASED; urgency=low
debian/control to avoid mangling this file (LP: #756373). The new
simplified parser has no problems with comments in debian/control
(LP: #701487, #713827).
* doc/setup-packaging-environment.1: Fix typo "helps to" -> "helps one to".
* doc/setup-packaging-environment.1: Fix typo.
* Bump Standards-Version to 3.9.2 (no changes required).
* Drop transitional qemu-kvm-extras-static from alternative suggests.
@ -25,7 +33,7 @@ ubuntu-dev-tools (0.121) UNRELEASED; urgency=low
* lp-project-upload: Use a milestone that already exists if there is
one to use.
-- Ted Gould <ted@ubuntu.com> Mon, 18 Apr 2011 17:52:30 +0200
-- Benjamin Drung <bdrung@debian.org> Tue, 19 Apr 2011 08:49:06 +0200
ubuntu-dev-tools (0.120) unstable; urgency=low

View File

@ -4,7 +4,7 @@ lp\-project\-upload \- Upload a release tarball to a Launchpad project.
.SH SYNOPSIS
.B lp\-project\-upload
.I project-name version tarball
.I project-name version tarball [new milestone]
.SH DESCRIPTION
\fBlp\-project\-upload\fR uploads a tarball release of a project to Launchpad.

View File

@ -79,13 +79,16 @@ def edit_file(prefix, description):
return content.strip()
def main():
if len(sys.argv) != 4:
if len(sys.argv) != 4 and len(sys.argv) != 5:
print >> sys.stderr, '''Upload a release tarball to a Launchpad project.
Usage: %s <project name> <version> <tarball>''' % sys.argv[0]
Usage: %s <project name> <version> <tarball> [new milestone]''' % sys.argv[0]
sys.exit(1)
(project, version, tarball) = sys.argv[1:]
if len(sys.argv) == 4:
(project, version, tarball) = sys.argv[1:]
else:
(project, version, tarball, new_milestone) = sys.argv[1:]
try:
launchpad = Launchpad.login_with('ubuntu-dev-tools', 'production')
@ -141,6 +144,13 @@ def main():
release.lp_save()
# Create a new milestone if requested
if new_milestone is not None:
mil = release.milestone
for series in proj.series:
if mil.name in [milestone.name for milestone in series.all_milestones]:
series.newMilestone(name=new_milestone)
except HTTPError, error:
print 'An error happened in the upload:', error.content
sys.exit(1)