]> git.wh0rd.org - home.git/blobdiff - .bin/gnu-mklog
cros-board: update
[home.git] / .bin / gnu-mklog
index 52fd7cea3c6bb44c5754b69532d30494151c803f..9bc81792c5be063819669364b5809ba24c9ae8a0 100755 (executable)
@@ -14,7 +14,7 @@ import unidiff
 
 
 _loader = lambda *args: importlib.machinery.SourceFileLoader(*args).load_module()
-mklog = _loader('mklog', '/usr/local/src/gnu/gcc/git/contrib/mklog.py')
+mklog = _loader('mklog', '/usr/local/src/gnu/gcc/contrib/mklog.py')
 del _loader
 
 
@@ -93,8 +93,11 @@ def main(argv):
                 new_log = new_log.replace(pfile.path, relpath)
 
         # Read the old ChangeLog file and strip spurious whitespace.
+        # Specify the whitespace to strip explciitly as we want to leave the
+        # \f (^L) characters alone.
         with open(log, encoding='utf-8') as fp:
-            old_log = '\n'.join(x.rstrip() for x in fp.read().strip().splitlines())
+            old_log = '\n'.join(x.rstrip(' \t\r')
+                                for x in fp.read().strip().split('\n'))
 
         # Now update the ChangeLog file with the new entry at top.
         with open(log, 'w', encoding='utf-8') as fp: