[Treepkg-commits] r226 - in trunk: test treepkg

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Nov 20 22:35:13 CET 2009


Author: bh
Date: 2009-11-20 22:35:12 +0100 (Fri, 20 Nov 2009)
New Revision: 226

Modified:
   trunk/test/test_readconfig.py
   trunk/treepkg/packager.py
   trunk/treepkg/readconfig.py
Log:
Turn the SourcePackager class attribute changemsg_template into a
per-track configuration option called changelog_msg_template.  For now,
the change is compatible with old SourcePackager subclasses that
override changemsg_template.


Modified: trunk/test/test_readconfig.py
===================================================================
--- trunk/test/test_readconfig.py	2009-11-20 21:06:10 UTC (rev 225)
+++ trunk/test/test_readconfig.py	2009-11-20 21:35:12 UTC (rev 226)
@@ -42,6 +42,7 @@
 packager_class: readconfig_test.%(name)s
 handle_dependencies: True
 signing_key_id: abcd1234
+changelog_msg_template: Update to feature branch r%%(revision)d
 
 [pkg_extraargs]
 svn_url: svn://example.com/%(name)s/trunk
@@ -83,6 +84,7 @@
                           [
             dict(name="extraargs",
                  base_dir="/home/builder/mill/tracks/extraargs",
+                 changelog_msg_template="Update to revision %(revision)d",
                  deb_email="treepkg at example.com",
                  deb_fullname="TreePKG",
                  deb_build_options="parallel=2",
@@ -102,6 +104,8 @@
                                "tracks/extraargs/mytarball.tgz")),
             dict(name="simple",
                  base_dir="/home/builder/mill/tracks/simple",
+                 changelog_msg_template=("Update to feature branch"
+                                         " r%(revision)d"),
                  deb_email="treepkg at example.com",
                  deb_fullname="TreePKG",
                  deb_build_options="",

Modified: trunk/treepkg/packager.py
===================================================================
--- trunk/treepkg/packager.py	2009-11-20 21:06:10 UTC (rev 225)
+++ trunk/treepkg/packager.py	2009-11-20 21:35:12 UTC (rev 226)
@@ -32,10 +32,9 @@
 
 class SourcePackager(object):
 
-    # Derived classes may want to override this message
-    changemsg_template = "Update to revision %(revision)d"
-
     pkg_basename = property(lambda self: self.track.pkg_basename)
+    changemsg_template = property(lambda self:
+                                  self.track.changelog_msg_template)
     track = _fromparent("track")
     revision = _fromparent("revision")
     pkg_revision = _fromparent("pkg_revision")
@@ -345,11 +344,13 @@
                  deb_fullname, packager_class="treepkg.packager",
                  pkg_revision_template="treepkg%(pkg_revision)d",
                  handle_dependencies=False, signing_key_id="", do_build=True,
-                 rules_svn_url=None, deb_build_options="", pkg_basename=""):
+                 rules_svn_url=None, deb_build_options="", pkg_basename="",
+                 changelog_msg_template="Update to r%(revision)s"):
         self.name = name
         if not pkg_basename:
             pkg_basename = name
         self.pkg_basename = pkg_basename
+        self.changelog_msg_template = changelog_msg_template
         self.base_dir = base_dir
         self.builder = PBuilder(pbuilderrc, root_cmd,
                                 release_signing_keyid=signing_key_id)

Modified: trunk/treepkg/readconfig.py
===================================================================
--- trunk/treepkg/readconfig.py	2009-11-20 21:06:10 UTC (rev 225)
+++ trunk/treepkg/readconfig.py	2009-11-20 21:35:12 UTC (rev 226)
@@ -30,6 +30,7 @@
     "pkg_revision_template", ("pkg_basename", str, ""),
     ("handle_dependencies", convert_bool),
     ("signing_key_id", str, ""),
+    ("changelog_msg_template", str, "Update to revision %(revision)d"),
     ]
 
 treepkg_desc = [



More information about the Treepkg-commits mailing list