summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2010-10-03 10:10:16 +0200
committerZac Medico <zmedico@gentoo.org>2010-10-03 01:39:24 -0700
commit31bec2832a5f42b50c2998ebbe282d3456934c05 (patch)
tree3622d2f4ca5c52f6742baca1ba70bb25327f492c
parentc796cb4a86c1a852a267b828b5981be59bc28598 (diff)
downloadportage-31bec2832a5f42b50c2998ebbe282d3456934c05.tar.gz
portage-31bec2832a5f42b50c2998ebbe282d3456934c05.tar.bz2
portage-31bec2832a5f42b50c2998ebbe282d3456934c05.zip
egencache --update-changelogs: strip leading CP from the log messages.
-rwxr-xr-xbin/egencache5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/egencache b/bin/egencache
index 48350e713..7c3d9a245 100755
--- a/bin/egencache
+++ b/bin/egencache
@@ -26,6 +26,7 @@ import optparse
import subprocess
import time
import textwrap
+import re
try:
import portage
@@ -562,9 +563,11 @@ class GenChangeLogs(object):
if wroteheader:
output.write('\n')
- # XXX: strip '<CP>: ' and '[<CP>] ' from the commit message
# XXX: strip the repoman suffix note from the commit message
+ # 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]))