← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~julian-edwards/launchpad/gina-changelog-bug-817096 into lp:launchpad

 

Julian Edwards has proposed merging lp:~julian-edwards/launchpad/gina-changelog-bug-817096 into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #817096 in Launchpad itself: "Changeslist emails from syncs has a weirdly formatted changelog"
  https://bugs.launchpad.net/launchpad/+bug/817096

For more details, see:
https://code.launchpad.net/~julian-edwards/launchpad/gina-changelog-bug-817096/+merge/69774

The changelog parser in Gina didn't insert newlines properly into its output.  This branch fixes that.
-- 
https://code.launchpad.net/~julian-edwards/launchpad/gina-changelog-bug-817096/+merge/69774
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~julian-edwards/launchpad/gina-changelog-bug-817096 into lp:launchpad.
=== modified file 'lib/lp/soyuz/doc/gina.txt'
--- lib/lp/soyuz/doc/gina.txt	2011-05-27 19:53:20 +0000
+++ lib/lp/soyuz/doc/gina.txt	2011-07-29 12:28:32 +0000
@@ -211,7 +211,7 @@
 
 Check if the changelog message was stored correcly:
 
-    >>> print x11p.changelog_entry
+    >>> print x11p.changelog_entry #doctest: -NORMALIZE_WHITESPACE
     x11proto-damage (6.8.99.7-2) breezy; urgency=low
     <BLANKLINE>
     <BLANKLINE>

=== modified file 'lib/lp/soyuz/scripts/gina/changelog.py'
--- lib/lp/soyuz/scripts/gina/changelog.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/scripts/gina/changelog.py	2011-07-29 12:28:32 +0000
@@ -72,12 +72,13 @@
                 #print "state0 Exception skip"
                 continue
             firstline = line.strip()
-            stanza = [line, '\n']
+            stanza = [line, '\n', '\n']
             state = 1
             continue
 
         if state == 1:
             stanza.append(line)
+            stanza.append('\n')
 
             if line.startswith(" --") and "@" in line:
                 #print "state1 accept"