From de25fb4a6ca933985f0921f97d48d6c1b2d74ebe Mon Sep 17 00:00:00 2001 From: Stefano Rivera Date: Fri, 9 Sep 2011 20:20:29 +0200 Subject: [PATCH] submittodebian: Don't parse the entire changelog, to avoid bumping into past illegal version numbers (LP: #727314) --- debian/changelog | 2 ++ submittodebian | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 160c3de..4457e3d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,8 @@ ubuntu-dev-tools (0.131) UNRELEASED; urgency=low (LP: #845487) * requestsync: Add nice error messages to gpg-signing code, rather than simple assertions (LP: #537288) + * submittodebian: Don't parse the entire changelog, to avoid bumping into + past illegal version numbers (LP: #727314) [ Colin Watson ] * syncpackage: Fix typo. diff --git a/submittodebian b/submittodebian index 3d4ffc4..f19a267 100755 --- a/submittodebian +++ b/submittodebian @@ -45,9 +45,10 @@ if not os.path.exists('/usr/bin/reportbug'): sys.exit(1) def get_most_recent_debian_version(changelog): - for version in changelog.get_versions(): - if not re.search('(ubuntu|build)', version.full_version): - return version.full_version + for block in changelog._blocks: + version = block.version.full_version + if not re.search('(ubuntu|build)', version): + return version def get_bug_body(changelog): msg = """In Ubuntu, the attached patch was applied to achieve the following: