changeset 517:de78084fcbce

rename do_svn_update in do_update because we provide svn and git support now
author Bjoern Ricks <bricks@intevation.de>
date Wed, 10 Nov 2010 13:17:32 +0000
parents f2de1c162d30
children 452c5670ec6b
files bin/runtreepkg.py test/test_packager.py treepkg/packager.py
diffstat 3 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/bin/runtreepkg.py	Wed Nov 10 12:03:58 2010 +0000
+++ b/bin/runtreepkg.py	Wed Nov 10 13:17:32 2010 +0000
@@ -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:
--- a/test/test_packager.py	Wed Nov 10 12:03:58 2010 +0000
+++ b/test/test_packager.py	Wed Nov 10 13:17:32 2010 +0000
@@ -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:
--- a/treepkg/packager.py	Wed Nov 10 12:03:58 2010 +0000
+++ b/treepkg/packager.py	Wed Nov 10 13:17:32 2010 +0000
@@ -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)
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)