Mercurial > treepkg
changeset 306:163f0d8b64eb
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.
author | Bernhard Herzog <bh@intevation.de> |
---|---|
date | Tue, 01 Dec 2009 11:42:14 +0000 |
parents | 3781e9958eba |
children | 5f442b0cf3a4 |
files | test/test_readconfig.py treepkg/packager.py treepkg/readconfig.py |
diffstat | 3 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/test/test_readconfig.py Tue Dec 01 11:26:47 2009 +0000 +++ b/test/test_readconfig.py Tue Dec 01 11:42:14 2009 +0000 @@ -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")])
--- a/treepkg/packager.py Tue Dec 01 11:26:47 2009 +0000 +++ b/treepkg/packager.py Tue Dec 01 11:42:14 2009 +0000 @@ -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:
--- a/treepkg/readconfig.py Tue Dec 01 11:26:47 2009 +0000 +++ b/treepkg/readconfig.py Tue Dec 01 11:42:14 2009 +0000 @@ -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, ""),