diff options
author | Bogdano Arendartchuk <bogdano@mandriva.org> | 2007-06-12 18:17:02 +0000 |
---|---|---|
committer | Bogdano Arendartchuk <bogdano@mandriva.org> | 2007-06-12 18:17:02 +0000 |
commit | 56082bc3c339c8273260449baf880096fa2375ba (patch) | |
tree | 7feed091692a8e4e122830f8ae75a026a7da0855 /RepSys/log.py | |
parent | f41e9b252f08fdc800eec27cc6d5aaec5a65ca54 (diff) | |
download | mgarepo-56082bc3c339c8273260449baf880096fa2375ba.tar mgarepo-56082bc3c339c8273260449baf880096fa2375ba.tar.gz mgarepo-56082bc3c339c8273260449baf880096fa2375ba.tar.bz2 mgarepo-56082bc3c339c8273260449baf880096fa2375ba.tar.xz mgarepo-56082bc3c339c8273260449baf880096fa2375ba.zip |
Introduced CLOG: the complement for SILENT
Diffstat (limited to 'RepSys/log.py')
-rw-r--r-- | RepSys/log.py | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/RepSys/log.py b/RepSys/log.py index 8035997..b00b86b 100644 --- a/RepSys/log.py +++ b/RepSys/log.py @@ -242,13 +242,25 @@ def parse_raw_date(rawdate): return time.strftime("%a %b %d %Y", rawdate) def filter_log_lines(lines): - # lines in commit messages containing SILENT at any position will be - # skipped; commits with their log messages beggining with SILENT in the - # first positionj of the first line will have all lines ignored. - ignstr = config.get("log", "ignore-string", "SILENT") - if len(lines) and lines[0].startswith(ignstr): - return [] - filtered = [line for line in lines if ignstr not in line] + # Lines in commit messages beginning with CLOG will be the only shown + # in the changelog. These lines will have the CLOG token and blanks + # stripped from the beginning. + onlylines = None + clogstr = config.get("log", "unignore-string") + if clogstr: + clogre = re.compile(r"(^%s[^ \t]?[ \t])" % clogstr) + onlylines = [clogre.sub("", line) + for line in lines if line.startswith(clogstr)] + if onlylines: + filtered = onlylines + else: + # Lines in commit messages containing SILENT at any position will be + # skipped; commits with their log messages beggining with SILENT in the + # first positionj of the first line will have all lines ignored. + ignstr = config.get("log", "ignore-string", "SILENT") + if len(lines) and lines[0].startswith(ignstr): + return [] + filtered = [line for line in lines if ignstr not in line] return filtered |