submittodebian: if the package is in bzr, look for bzr metadata first

before looking for a previous package revision in the parent dir.
This commit is contained in:
Steve Langasek 2009-12-11 13:46:28 -08:00
parent 5343d2348f
commit 2fed60d3c4
2 changed files with 28 additions and 16 deletions

4
debian/changelog vendored
View File

@ -1,6 +1,8 @@
ubuntu-dev-tools (0.84ubuntu1) UNRELEASED; urgency=low ubuntu-dev-tools (0.85) UNRELEASED; urgency=low
* submittodebian: switch to use lucid as the default distro tag. * submittodebian: switch to use lucid as the default distro tag.
* submittodebian: if the package is in bzr, look for bzr metadata first
before looking for a previous package revision in the parent dir.
-- Steve Langasek <steve.langasek@ubuntu.com> Fri, 11 Dec 2009 13:28:24 -0800 -- Steve Langasek <steve.langasek@ubuntu.com> Fri, 11 Dec 2009 13:28:24 -0800

View File

@ -2,8 +2,9 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# #
# submittodebian - tool to submit patches to Debian's BTS # submittodebian - tool to submit patches to Debian's BTS
# Copyright (C) 2007 Canonical Ltd. # Copyright (C) 2007, 2009 Canonical Ltd.
# Author: Soren Hansen <soren@ubuntu.com> # Author: Soren Hansen <soren@ubuntu.com>,
# Steve Langasek <slangasek@canonical.com>
# #
# ################################################################## # ##################################################################
# #
@ -51,6 +52,15 @@ def gen_debdiff(changelog):
oldver = changelog._blocks[1].version oldver = changelog._blocks[1].version
newver = changelog._blocks[0].version newver = changelog._blocks[0].version
try:
print "Extracting bzr diff between %s and %s" % (oldver, newver)
(fd, debdiff) = mkstemp()
os.close(fd)
cmd = 'bzr diff -r tag:%s | filterdiff -x "*changelog*" > %s' % (oldver, debdiff)
run_cmd(cmd)
except:
os.unlink(debdiff)
if oldver.epoch is not None: if oldver.epoch is not None:
oldver = str(oldver)[str(oldver).index(":")+1:] oldver = str(oldver)[str(oldver).index(":")+1:]
if newver.epoch is not None: if newver.epoch is not None: