diff options
author | Bogdano Arendartchuk <bogdano@mandriva.org> | 2007-11-08 16:30:08 +0000 |
---|---|---|
committer | Bogdano Arendartchuk <bogdano@mandriva.org> | 2007-11-08 16:30:08 +0000 |
commit | 0b923f7cebcdb0f9435c0961a08c537fad7608e0 (patch) | |
tree | eb3e2ce99d37cd130fcb3eb9b735e571f0f3cf50 | |
parent | e5ac8131f63ee32d79c2d4e8232cd8d047add24c (diff) | |
download | mgarepo-0b923f7cebcdb0f9435c0961a08c537fad7608e0.tar mgarepo-0b923f7cebcdb0f9435c0961a08c537fad7608e0.tar.gz mgarepo-0b923f7cebcdb0f9435c0961a08c537fad7608e0.tar.bz2 mgarepo-0b923f7cebcdb0f9435c0961a08c537fad7608e0.tar.xz mgarepo-0b923f7cebcdb0f9435c0961a08c537fad7608e0.zip |
Added the complement to SILENT: CLOG
When using CLOG, only those lines beginning with this token will be shown.
It only works when enabled in repsys.conf.
-rw-r--r-- | CHANGES | 4 | ||||
-rw-r--r-- | RepSys/log.py | 26 | ||||
-rw-r--r-- | repsys.conf | 4 |
3 files changed, 27 insertions, 7 deletions
@@ -1,3 +1,7 @@ +* 1.6.19 +- added complement for SILENT: CLOG, which hides everything that does not + start with this token + * 1.6.18 - added the subcommand "switch" to help with mirrors support - initialize plugins in create-srpm too diff --git a/RepSys/log.py b/RepSys/log.py index 009e4e0..10026c3 100644 --- a/RepSys/log.py +++ b/RepSys/log.py @@ -246,13 +246,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 diff --git a/repsys.conf b/repsys.conf index bbe99af..2201ac1 100644 --- a/repsys.conf +++ b/repsys.conf @@ -13,6 +13,10 @@ oldurl = svn+ssh://svn.mandriva.com/svn/packages/misc revision-offset = 0 # commit lines containing this string won't be shown in the changelog: ignore-string = SILENT +# and in case of only allowing a few lines to be visible, use this: +#unignore-string = CLOG +# see repsys.macros: +#macros-file = /etc/repsys.macros [template] path = /usr/share/repsys/default.chlog |