merge-changelog: Fix setting of newlines.

Signed-off-by: Mattia Rizzolo <mattia@debian.org>
This commit is contained in:
Krytarik Raido 2021-03-17 00:45:04 +01:00 committed by Mattia Rizzolo
parent ceb020d0fa
commit a1b56ac31f
No known key found for this signature in database
GPG Key ID: 0816B9E18C762BAD
2 changed files with 8 additions and 2 deletions

3
debian/changelog vendored
View File

@ -5,6 +5,9 @@ ubuntu-dev-tools (0.185) UNRELEASED; urgency=medium
+ Fix crash due to PersonalPackageArchiveSourcePackage() returning the
wrong object when requesting a download url. LP: #1938659
[ Krytarik Raido ]
* merge-changelog: Fix setting of newlines.
-- Mattia Rizzolo <mattia@debian.org> Wed, 04 Aug 2021 11:59:05 +0200
ubuntu-dev-tools (0.184) experimental; urgency=medium

View File

@ -54,7 +54,10 @@ def merge_changelog(left_changelog, right_changelog):
left_blocks = iter(left_cl)
right_blocks = iter(right_cl)
for version in sorted(left_versions | right_versions, reverse=True):
clist = sorted(left_versions | right_versions, reverse=True)
ci = len(clist)
for version in clist:
ci -= 1
if version in left_versions:
block = next(left_blocks)
if version in right_versions:
@ -64,7 +67,7 @@ def merge_changelog(left_changelog, right_changelog):
assert block.version == version
Logger.info(str(block).strip() + '\n\n')
Logger.info(str(block).strip() + ('\n' if ci else ''))
def main():