[Checkins] SVN: zc.recipe.zope3checkout/trunk/ Added support for the buildout newest mode (-N option) to avoid

Jim Fulton jim at zope.com
Fri Feb 9 13:24:04 EST 2007


Log message for revision 72487:
  Added support for the buildout newest mode (-N option) to avoid
  checking for updates when -N is used.
  

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

-=-
Modified: zc.recipe.zope3checkout/trunk/CHANGES.txt
===================================================================
--- zc.recipe.zope3checkout/trunk/CHANGES.txt	2007-02-09 18:06:14 UTC (rev 72486)
+++ zc.recipe.zope3checkout/trunk/CHANGES.txt	2007-02-09 18:24:04 UTC (rev 72487)
@@ -1,6 +1,12 @@
 Change History
 **************
 
+1.2 (2007-02-09)
+================
+
+- Added support for the buildout newest mode (-N option) to avoid
+  checking for updates when -N is used.
+
 1.1 (2007-01-22)
 ================
 

Modified: zc.recipe.zope3checkout/trunk/setup.py
===================================================================
--- zc.recipe.zope3checkout/trunk/setup.py	2007-02-09 18:06:14 UTC (rev 72486)
+++ zc.recipe.zope3checkout/trunk/setup.py	2007-02-09 18:24:04 UTC (rev 72487)
@@ -7,7 +7,7 @@
 
 setup(
     name = name,
-    version = "1.1",
+    version = "1.2",
     author = "Jim Fulton",
     author_email = "jim at zope.com",
     description = "ZC Buildout recipe for installing a Zope 3 checkout",

Modified: zc.recipe.zope3checkout/trunk/src/zc/recipe/zope3checkout/__init__.py
===================================================================
--- zc.recipe.zope3checkout/trunk/src/zc/recipe/zope3checkout/__init__.py	2007-02-09 18:06:14 UTC (rev 72486)
+++ zc.recipe.zope3checkout/trunk/src/zc/recipe/zope3checkout/__init__.py	2007-02-09 18:24:04 UTC (rev 72487)
@@ -20,6 +20,11 @@
         self.location = options['location']
         self.url = options['url']
         self.executable = options['executable']
+        self.newest = (
+            buildout['buildout'].get('offline', 'false') == 'false'
+            and
+            buildout['buildout'].get('newest', 'true') == 'true'
+            )
 
     def update(self):
         """Update the Zope 3 checkout.
@@ -27,7 +32,7 @@
         Does nothing if buildout is in offline mode.
 
         """
-        if self.buildout['buildout'].get('offline') == 'true':
+        if not self.newest:
             return self.location
 
         os.chdir(self.location)



More information about the Checkins mailing list