From ffdaa7d17062bf450a040b34056aaf0e096a9599 Mon Sep 17 00:00:00 2001 From: Bogdano Arendartchuk Date: Tue, 5 Feb 2008 21:06:50 +0000 Subject: Set the default template path and update the built-in one to match default.chlog --- CHANGES | 1 + RepSys/log.py | 21 ++++++++++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/CHANGES b/CHANGES index fa7889a..5a57363 100644 --- a/CHANGES +++ b/CHANGES @@ -10,6 +10,7 @@ - make 'repsys submit' without package name or revision number work again - if REPSYS_CONF is set, /etc/repsys.conf and ~/.repsys/config will not be readed anymore +- changed the built-in template to the current default.chlog - added option -F to repsys ci to set a log message file - added option --strict to getsrpm to check if the revision provided matches the package URL; diff --git a/RepSys/log.py b/RepSys/log.py index df7bc9f..68cbbc0 100644 --- a/RepSys/log.py +++ b/RepSys/log.py @@ -23,17 +23,27 @@ locale.setlocale(locale.LC_ALL, "C") default_template = """ #for $rel in $releases_by_author * $rel.date $rel.author_name <$rel.author_email> $rel.version-$rel.release - ## - #if not $rel.released - (not released yet) ++ Revision: $rel.revision +## #if not $rel.released +##+ Status: not released +## #end if + #if not $rel.visible ++ rebuild (emptylog) #end if #for $rev in $rel.release_revisions #for $line in $rev.lines - $line +$line #end for #end for #for $author in $rel.authors + #if $author.revisions and not $author.revisions[0].lines + #continue + #end if + ##alternatively, one could use: + ###if $author.email == "root" + ## #continue + ###end if + $author.name <$author.email> #for $rev in $author.revisions #for $line in $rev.lines @@ -298,7 +308,8 @@ def make_release(author=None, revision=None, date=None, lines=None, def dump_file(releases, currentlog=None, template=None): - templpath = template or config.get("template", "path", None) + templpath = template or config.get("template", "path", + "/usr/share/repsys/default.chlog") params = {} if templpath is None or not os.path.exists(templpath): params["source"] = default_template -- cgit v1.2.1