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

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Dec 1 12:42:14 CET 2009


Author: bh
Date: 2009-12-01 12:42:14 +0100 (Tue, 01 Dec 2009)
New Revision: 232

Modified:
   trunk/test/test_readconfig.py
   trunk/treepkg/packager.py
   trunk/treepkg/readconfig.py
Log:
Make the svn external subdirectories configurable in the configuration
file with the per-track option svn_externals.  The class attribute
svn_external_subdirs is still used if svn_externals were specified.


Modified: trunk/test/test_readconfig.py
===================================================================
--- trunk/test/test_readconfig.py	2009-12-01 11:26:47 UTC (rev 231)
+++ trunk/test/test_readconfig.py	2009-12-01 11:42:14 UTC (rev 232)
@@ -49,6 +49,7 @@
 svn_url: svn://example.com/%(name)s/trunk
 svn_subset: -N .
             subdir
+svn_externals: scripts admin
 base_dir: %(tracks_dir)s/%(name)s
 packager_class: readconfig_test.extraargs
 orig_tarball: %(base_dir)s/mytarball.tgz
@@ -101,6 +102,7 @@
                  pkg_basename="",
                  root_cmd=['sudo'],
                  signing_key_id="",
+                 svn_externals=["scripts", "admin"],
                  svn_subset=[(".", False), ("subdir", True)],
                  svn_url="svn://example.com/extraargs/trunk",
                  rules_svn_url="file:///tmp/my-debian-repository",
@@ -122,6 +124,7 @@
                  pkg_basename="simple1",
                  root_cmd=['sudo'],
                  signing_key_id="abcd1234",
+                 svn_externals=[],
                  svn_subset=[],
                  svn_url="svn://example.com/simple/trunk",
                  version_template="1.0.svn%(revision)s")])

Modified: trunk/treepkg/packager.py
===================================================================
--- trunk/treepkg/packager.py	2009-12-01 11:26:47 UTC (rev 231)
+++ trunk/treepkg/packager.py	2009-12-01 11:42:14 UTC (rev 232)
@@ -347,7 +347,7 @@
                  handle_dependencies=False, signing_key_id="", do_build=True,
                  rules_svn_url=None, deb_build_options="", pkg_basename="",
                  changelog_msg_template="Update to r%(revision)s",
-                 svn_subset=()):
+                 svn_subset=(), svn_externals=()):
         self.name = name
         if not pkg_basename:
             pkg_basename = name
@@ -368,8 +368,10 @@
         self.pkg_dir_template = "%(revision)d-%(rules_revision)d"
         self.pkg_dir_regex = re.compile(r"(?P<revision>[0-9]+)"
                                         r"-(?P<rules_revision>[0-9]+)$")
-        repo = SvnRepository(svn_url, self.svn_external_subdirs,
-                             subset=svn_subset)
+        externals = svn_externals
+        if not externals:
+            externals = self.svn_external_subdirs
+        repo = SvnRepository(svn_url, externals, subset=svn_subset)
         self.working_copy = SvnWorkingCopy(repo, self.checkout_dir,
                                            logger=logging)
         if rules_svn_url:

Modified: trunk/treepkg/readconfig.py
===================================================================
--- trunk/treepkg/readconfig.py	2009-12-01 11:26:47 UTC (rev 231)
+++ trunk/treepkg/readconfig.py	2009-12-01 11:42:14 UTC (rev 232)
@@ -66,6 +66,7 @@
 packager_desc = [
     "name", "base_dir",
     "svn_url", ("svn_subset", convert_subversion_subset, ""),
+    ("svn_externals", shlex.split, ""),
     ("rules_svn_url", str, ""), "packager_class",
     ("root_cmd", shlex.split, "sudo"), "pbuilderrc",
     "deb_email", "deb_fullname", ("deb_build_options", str, ""),



More information about the Treepkg-commits mailing list