[Checkins] SVN: zc.recipe.zope3checkout/trunk/ added support for checking out specific revisions

Thomas Lotze tl at gocept.com
Wed Jan 3 04:52:30 EST 2007


Log message for revision 71688:
  added support for checking out specific revisions

Changed:
  U   zc.recipe.zope3checkout/trunk/README.txt
  U   zc.recipe.zope3checkout/trunk/src/zc/recipe/zope3checkout/__init__.py

-=-
Modified: zc.recipe.zope3checkout/trunk/README.txt
===================================================================
--- zc.recipe.zope3checkout/trunk/README.txt	2007-01-02 18:00:28 UTC (rev 71687)
+++ zc.recipe.zope3checkout/trunk/README.txt	2007-01-03 09:52:28 UTC (rev 71688)
@@ -5,11 +5,17 @@
 
 Hopefully, when Zope is packaged as eggs, this won't be necessary.
 
-The recipe has a single option, which is the Subversion URL to use to
-checkout Zope.  For example, to get the 3.3 branch, use:
+The recipe has two options:
 
+- The Subversion URL to use to checkout Zope. For example, to get the 3.3
+  branch, use:
+
    url = svn://svn.zope.org/repos/main/branches/3.3
 
+  This option is required.
+
+- The revision to check out. This is optional and defaults to "HEAD".
+
 The checkout is installed into a subdirectory of the buildout parts
 directory whose name is the part name used for the recipe.
 

Modified: zc.recipe.zope3checkout/trunk/src/zc/recipe/zope3checkout/__init__.py
===================================================================
--- zc.recipe.zope3checkout/trunk/src/zc/recipe/zope3checkout/__init__.py	2007-01-02 18:00:28 UTC (rev 71687)
+++ zc.recipe.zope3checkout/trunk/src/zc/recipe/zope3checkout/__init__.py	2007-01-03 09:52:28 UTC (rev 71688)
@@ -11,6 +11,7 @@
         options['location'] = os.path.join(
             buildout['buildout']['parts-directory'],
             self.name)
+        options.setdefault('revision', 'HEAD')
 
     def install(self):
         options = self.options
@@ -19,7 +20,7 @@
             if self.buildout.get('offline') == 'true':
                 return location
             os.chdir(location)
-            i, o = os.popen4('svn up')
+            i, o = os.popen4('svn up -r %s' % options['revision'])
             i.close()
             change = re.compile('[ADUCM] ').match
             for l in o:
@@ -32,8 +33,8 @@
                     o.close()
                     return location
         else:
-            assert os.system('svn co %s %s' % (options['url'], location)
-                             ) == 0
+            assert os.system('svn co -r %s %s %s' % (
+                options['revision'], options['url'], location)) == 0
             os.chdir(location)
 
         assert os.spawnl(



More information about the Checkins mailing list