Mercurial > treepkg
changeset 532:9c8e2c05c775
add more substituteable variables for changelog message
author | Bjoern Ricks <bricks@intevation.de> |
---|---|
date | Wed, 22 Dec 2010 16:44:04 +0000 |
parents | b5e0c81c9bcc |
children | 3d8709da5fc2 |
files | treepkg/packager.py |
diffstat | 1 files changed, 16 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/treepkg/packager.py Mon Nov 22 11:26:06 2010 +0000 +++ b/treepkg/packager.py Wed Dec 22 16:44:04 2010 +0000 @@ -56,6 +56,14 @@ def __init__(self, parent): self.parent = parent + self.rules_revision = self.parent.rules_revision + self.pkg_revision = self.parent.pkg_revision + self.short_revision = self.revision + if len(self.pkg_revision) > 7: + self.short_revision = self.short_revision[:7] + localtime = time.localtime() + self.pkg_date = time.strftime("%Y%m%d", localtime) + self.pkg_time = time.strftime("%H%M", localtime) def determine_upstream_version(self, directory=None): """ @@ -113,14 +121,11 @@ determine_upstream_version. Default: "0" """ revision = self.revision - rules_revision = self.parent.rules_revision - pkg_revision = self.parent.pkg_revision - short_revision = revision - if len(pkg_revision) > 7: - short_revision = short_revision[:7] - localtime = time.localtime() - pkg_date = time.strftime("%Y%m%d", localtime) - pkg_time = time.strftime("%H%M", localtime) + rules_revision = self.rules_revision + pkg_revision = self.pkg_revision + short_revision = self.short_revision + pkg_date = self.pkg_date + pkg_time = self.pkg_time upstream_version = self.determine_upstream_version(directory) version_dict = locals().copy() if additionals: @@ -304,7 +309,9 @@ self.move_source_package(pkgbasename) def get_change_msg(self): - return self.changemsg_template % dict(revision=self.revision) + return self.changemsg_template % dict(revision=self.revision, + pkg_date=self.pkg_date, pkg_time=self.pkg_time, + rules_revision=self.rules_revision) class BinaryPackager(object):