egencache --update-changelogs: don't break change list on hyphens.
authorMichał Górny <mgorny@gentoo.org>
Sun, 3 Oct 2010 08:34:51 +0000 (10:34 +0200)
committerZac Medico <zmedico@gentoo.org>
Sun, 3 Oct 2010 08:39:24 +0000 (01:39 -0700)
bin/egencache

index 7c3d9a245fc6f6642da28c256206f6de8f37729e..cc83f9fd1be4e853052d37fa7f48fa5afd694e74 100755 (executable)
@@ -568,8 +568,12 @@ class GenChangeLogs(object):
                        # strip '<cp>: ', '[<cp>] ', and similar
                        body[0] = re.sub(r'^\W*' + cp + '\W+', '', body[0])
 
-                       body.insert(0, '%s; %s %s:' % (date, author, ', '.join(changed)))
-                       output.write('\n'.join([self._wrapper.fill(x) for x in body]))
+                       # don't break filenames on hyphens
+                       self._wrapper.break_on_hyphens = False
+                       output.write(self._wrapper.fill('%s; %s %s:' % (date, author, ', '.join(changed))))
+                       # but feel free to break commit messages there
+                       self._wrapper.break_on_hyphens = True
+                       output.write('\n'.join([''] + [self._wrapper.fill(x) for x in body]))
 
                output.close()