[Treepkg-commits] r347 - in branches/treepkg-status: test treepkg treepkg/info
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Jul 8 12:07:42 CEST 2010
Author: bricks
Date: 2010-07-08 12:07:39 +0200 (Thu, 08 Jul 2010)
New Revision: 347
Added:
branches/treepkg-status/treepkg/info/
Removed:
branches/treepkg-status/treepkg/status/
Modified:
branches/treepkg-status/test/test_readconfig.py
branches/treepkg-status/treepkg/packager.py
branches/treepkg-status/treepkg/readconfig.py
Log:
renamed new status dir to info because of a naming conflict with status.py
let the user specify a treepkg name in the config
the name is propagated to PackagerGroup
[treepkg]
name: <treepkgname>
becomes:
pg = PackagerGroup(...)
pg.name
Modified: branches/treepkg-status/test/test_readconfig.py
===================================================================
--- branches/treepkg-status/test/test_readconfig.py 2010-07-07 15:40:48 UTC (rev 346)
+++ branches/treepkg-status/test/test_readconfig.py 2010-07-08 10:07:39 UTC (rev 347)
@@ -34,6 +34,7 @@
[treepkg]
instructions_file: %(treepkg_dir)s/instructions
check_interval: 3600
+name: testtreepkg
[pkg_simple]
pkg_basename: simple1
@@ -82,7 +83,7 @@
treepkg_opts, packager_opts = read_config(config_file)
self.assertEquals(treepkg_opts,
dict(instructions_file="/home/builder/mill/instructions",
- check_interval=3600))
+ check_interval=3600, name="testtreepkg"))
self.assertEquals(sorted(packager_opts,
key=operator.itemgetter("name")),
[
@@ -134,3 +135,9 @@
git_url="",
git_branch="",
builder_cls="PBuilder")])
+
+def main():
+ unittest.main()
+
+if __name__ == "__main__":
+ main()
Copied: branches/treepkg-status/treepkg/info (from rev 346, branches/treepkg-status/treepkg/status)
Property changes on: branches/treepkg-status/treepkg/info
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: branches/treepkg-status/treepkg/packager.py
===================================================================
--- branches/treepkg-status/treepkg/packager.py 2010-07-07 15:40:48 UTC (rev 346)
+++ branches/treepkg-status/treepkg/packager.py 2010-07-08 10:07:39 UTC (rev 347)
@@ -641,7 +641,7 @@
def __init__(self, package_tracks, check_interval, revision=None,
instructions_file=None, do_svn_update=True,
- stop_on_error=False):
+ stop_on_error=False, name=""):
self.package_tracks = package_tracks
self.check_interval = check_interval
self.revision = revision
@@ -649,6 +649,7 @@
self.stop_on_error = stop_on_error
self.instructions_file = instructions_file
self.instructions_file_removed = False
+ self.name = name
self.sort_tracks()
def sort_tracks(self):
Modified: branches/treepkg-status/treepkg/readconfig.py
===================================================================
--- branches/treepkg-status/treepkg/readconfig.py 2010-07-07 15:40:48 UTC (rev 346)
+++ branches/treepkg-status/treepkg/readconfig.py 2010-07-08 10:07:39 UTC (rev 347)
@@ -84,6 +84,7 @@
treepkg_desc = [
("check_interval", int),
"instructions_file",
+ ("name", str, "")
]
More information about the Treepkg-commits
mailing list