[Treepkg-commits] r480 - in trunk: bin test treepkg

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Nov 10 14:17:34 CET 2010


Author: bricks
Date: 2010-11-10 14:17:32 +0100 (Wed, 10 Nov 2010)
New Revision: 480

Modified:
   trunk/bin/runtreepkg.py
   trunk/test/test_packager.py
   trunk/treepkg/packager.py
Log:
rename do_svn_update in do_update because we provide svn and git support now


Modified: trunk/bin/runtreepkg.py
===================================================================
--- trunk/bin/runtreepkg.py	2010-11-10 12:03:58 UTC (rev 479)
+++ trunk/bin/runtreepkg.py	2010-11-10 13:17:32 UTC (rev 480)
@@ -47,8 +47,8 @@
     parser.add_option("--revision",
                       help=("SVN revision to update to before attempting"
                             " to package."))
-    parser.add_option("--no-svn-update", action="store_true",
-                      help=("Do not update the SVN workingcopy before"
+    parser.add_option("--no-update", action="store_true",
+                      help=("Do not update the scm workingcopy before"
                             " attempting to package."))
     parser.add_option("--track-option", action="callback", type="string",
                       callback=handle_track_option,
@@ -82,7 +82,7 @@
         group = PackagerGroup([create_package_track(**opts)
                                for opts in packager_opts],
                               revision=options.revision,
-                              do_svn_update=not options.no_svn_update,
+                              do_update=not options.no_update,
                               stop_on_error=options.stop_on_error,
                               **treepkg_opts)
         if options.once:

Modified: trunk/test/test_packager.py
===================================================================
--- trunk/test/test_packager.py	2010-11-10 12:03:58 UTC (rev 479)
+++ trunk/test/test_packager.py	2010-11-10 13:17:32 UTC (rev 480)
@@ -187,7 +187,7 @@
         self.do_stop = do_stop
         self.instructions_file = instructions_file
 
-    def package_if_updated(self, revision, do_svn_update=True):
+    def package_if_updated(self, revision, do_update=True):
         if self.do_stop:
             writefile(self.instructions_file, "stop")
         if self.do_package:

Modified: trunk/treepkg/packager.py
===================================================================
--- trunk/treepkg/packager.py	2010-11-10 12:03:58 UTC (rev 479)
+++ trunk/treepkg/packager.py	2010-11-10 13:17:32 UTC (rev 480)
@@ -689,14 +689,14 @@
     def packager_for_new_revision(self):
         return self.new_revsision_packager()
 
-    def package_if_updated(self, revision=None, do_svn_update=True):
+    def package_if_updated(self, revision=None, do_update=True):
         """Returns a new packager if the working copy has not been packaged yet.
-        If do_svn_update is true -- the default -- update the working
+        If do_update is true -- the default -- update the working
         copy to the revision specified with the revision parameter
         or if revision is None, the latest revision in the repository."""
         if not self.do_build:
             return None
-        if do_svn_update:
+        if do_update:
             self.update_checkout(revision=revision)
             # TODO: what should happen with the debian checkout, if a
             # revision for the source checkoute was given?
@@ -769,13 +769,13 @@
 class PackagerGroup(object):
 
     def __init__(self, package_tracks, check_interval, revision=None,
-                 instructions_file=None, do_svn_update=True,
+                 instructions_file=None, do_update=True,
                  stop_on_error=False, name="", treepkg_dir=None, 
                  tracks_dir=None):
         self.package_tracks = package_tracks
         self.check_interval = check_interval
         self.revision = revision
-        self.do_svn_update = do_svn_update
+        self.do_update = do_update
         self.stop_on_error = stop_on_error
         self.instructions_file = instructions_file
         self.instructions_file_removed = False
@@ -856,7 +856,7 @@
             for track in self.package_tracks:
                 try:
                     packager = track.package_if_updated(revision=self.revision,
-                                              do_svn_update=self.do_svn_update)
+                                              do_update=self.do_update)
                     if packager:
                         packager.package()
                         repeat = self.install_dependencies(track, packager)



More information about the Treepkg-commits mailing list