review changelog formatting & remove white lines
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Fri, 20 Jun 2008 09:09:08 +0000 (09:09 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Fri, 20 Jun 2008 09:09:08 +0000 (09:09 +0000)
module-tools.py

index 594f81c..1a7ad8e 100755 (executable)
@@ -380,11 +380,16 @@ that for other purposes than tagging"""%topdir
     def unignored_lines (self, logfile):
         result=[]
         exclude="Tagging module %s"%self.name
+        white_line_matcher = re.compile("\A\s*\Z")
         for logline in file(logfile).readlines():
             if logline.strip() == Module.svn_magic_line:
                 break
-            if logline.find(exclude) < 0:
-                result += [ logline ]
+            if logline.find(exclude) >= 0:
+                continue
+            elif white_line_matcher.match(logline):
+                continue
+            else:
+                result.append(logline.strip()+'\n')
         return result
 
     def insert_changelog (self, logfile, oldtag, newtag):