Merge lp:~wgrant/launchpad/changelog-formatting into lp:launchpad

Proposed by William Grant on 2015-04-21
Status: Merged
Merged at revision: 17440
Proposed branch: lp:~wgrant/launchpad/changelog-formatting
Merge into: lp:launchpad
Diff against target: 70 lines (+9/-6)
5 files modified
lib/lp/archiveuploader/changesfile.py (+1/-1)
lib/lp/archiveuploader/tests/nascentupload.txt (+5/-1)
lib/lp/archiveuploader/tests/test_changesfile.py (+2/-2)
lib/lp/soyuz/doc/gina.txt (+0/-1)
lib/lp/soyuz/scripts/gina/changelog.py (+1/-1)
To merge this branch: bzr merge lp:~wgrant/launchpad/changelog-formatting
Reviewer Review Type Date Requested Status
Colin Watson 2015-04-21 Approve on 2015-04-21
Review via email: mp+256898@code.launchpad.net

Commit Message

Fix gina- and archiveuploader-generated SPR.changelog_entry values to not be misformatted.

Description of the Change

Fix gina- and archiveuploader-generated SPR.changelog_entry values to not be misformatted.

There was an extra line, a missing line, and an extra space. All tested.

We should go back and fix old data at some point.

To post a comment you must log in.
Colin Watson (cjwatson) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/archiveuploader/changesfile.py'
2--- lib/lp/archiveuploader/changesfile.py 2013-06-26 06:57:30 +0000
3+++ lib/lp/archiveuploader/changesfile.py 2015-04-21 10:12:29 +0000
4@@ -356,7 +356,7 @@
5 }}}
6 """
7 changes_author = (
8- '\n -- %s %s' %
9+ '\n\n -- %s %s' %
10 (self.changed_by['rfc822'], self.date))
11 return self.changes_comment + changes_author
12
13
14=== modified file 'lib/lp/archiveuploader/tests/nascentupload.txt'
15--- lib/lp/archiveuploader/tests/nascentupload.txt 2014-10-31 07:00:29 +0000
16+++ lib/lp/archiveuploader/tests/nascentupload.txt 2015-04-21 10:12:29 +0000
17@@ -331,9 +331,13 @@
18 Check if we have rebuid the change's author line properly (as
19 mentioned in bug # 30621)
20
21- >>> print ed_spr.changelog_entry
22+ >>> print ed_spr.changelog_entry #doctest: -NORMALIZE_WHITESPACE
23 ed (0.2-20) unstable; urgency=low
24+ <BLANKLINE>
25+ * Move to dpatch; existing non-debian/ changes split into
26 ...
27+ Closes: #130327
28+ <BLANKLINE>
29 -- James Troup <james@nocrew.org> Wed, 2 Apr 2003 17:19:47 +0100
30
31 Some new fields required for NoMoreAptFtparchive implementation are
32
33=== modified file 'lib/lp/archiveuploader/tests/test_changesfile.py'
34--- lib/lp/archiveuploader/tests/test_changesfile.py 2013-08-07 06:26:36 +0000
35+++ lib/lp/archiveuploader/tests/test_changesfile.py 2015-04-21 10:12:29 +0000
36@@ -263,8 +263,8 @@
37 "mypkg_0.1_i386.changes", contents)
38 self.assertEquals([], list(changes.processAddresses()))
39 self.assertEquals(
40- "Something changed\n"
41- " -- Somebody <somebody@ubuntu.com> "
42+ "Something changed\n\n"
43+ " -- Somebody <somebody@ubuntu.com> "
44 "Fri, 25 Jun 2010 11:20:22 -0600",
45 changes.simulated_changelog)
46
47
48=== modified file 'lib/lp/soyuz/doc/gina.txt'
49--- lib/lp/soyuz/doc/gina.txt 2015-04-20 09:48:57 +0000
50+++ lib/lp/soyuz/doc/gina.txt 2015-04-21 10:12:29 +0000
51@@ -219,7 +219,6 @@
52 >>> print x11p.changelog_entry #doctest: -NORMALIZE_WHITESPACE
53 x11proto-damage (6.8.99.7-2) breezy; urgency=low
54 <BLANKLINE>
55- <BLANKLINE>
56 * Add dependency on x11proto-fixes-dev.
57 <BLANKLINE>
58 -- Daniel Stone <daniel.stone@ubuntu.com> Mon, 11 Jul 2005 19:11:11 +1000
59
60=== modified file 'lib/lp/soyuz/scripts/gina/changelog.py'
61--- lib/lp/soyuz/scripts/gina/changelog.py 2011-07-29 12:22:17 +0000
62+++ lib/lp/soyuz/scripts/gina/changelog.py 2015-04-21 10:12:29 +0000
63@@ -72,7 +72,7 @@
64 #print "state0 Exception skip"
65 continue
66 firstline = line.strip()
67- stanza = [line, '\n', '\n']
68+ stanza = [line, '\n']
69 state = 1
70 continue
71