[Buildbot-commits] buildbot/buildbot/process step.py,1.73,1.74

Brian Warner warner at users.sourceforge.net
Mon Oct 24 21:49:20 UTC 2005


Update of /cvsroot/buildbot/buildbot/buildbot/process
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21603/buildbot/process

Modified Files:
	step.py 
Log Message:
Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-378
Creator:  Brian Warner <warner at lothar.com>

s/slaveVersionNewEnough/slaveVersionIsOlderThan/

	* buildbot/process/step.py (BuildStep): rename
	slaveVersionNewEnough to slaveVersionIsOlderThan, because that's
	how it is normally used.
	* buildbot/test/test_steps.py (Version.checkCompare): same


Index: step.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/process/step.py,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -d -r1.73 -r1.74
--- step.py	24 Oct 2005 21:39:52 -0000	1.73
+++ step.py	24 Oct 2005 21:49:18 -0000	1.74
@@ -632,16 +632,16 @@
         """
         return self.build.getSlaveCommandVersion(command, oldversion)
 
-    def slaveVersionNewEnough(self, command, minversion):
+    def slaveVersionIsOlderThan(self, command, minversion):
         sv = self.build.getSlaveCommandVersion(command, None)
         if sv is None:
-            return False
+            return True
         # the version we get back is a string form of the CVS version number
         # of the slave's buildbot/slave/commands.py, something like 1.39 .
         # This might change in the future (I might move away from CVS), but
         # if so I'll keep updating that string with suitably-comparable
         # values.
-        if sv.split(".") >= minversion.split("."):
+        if sv.split(".") < minversion.split("."):
             return True
         return False
 
@@ -1191,7 +1191,7 @@
         return formatdate(when)
 
     def startVC(self, branch, revision, patch):
-        if not self.slaveVersionNewEnough("cvs", "1.39"):
+        if self.slaveVersionIsOlderThan("cvs", "1.39"):
             # the slave doesn't know to avoid re-using the same sourcedir
             # when the branch changes. We have no way of knowing which branch
             # the last build used, so if we're using a non-default branch and
@@ -1298,7 +1298,7 @@
             m = "slave does not have the 'svn' command"
             raise BuildSlaveTooOldError(m)
 
-        if not self.slaveVersionNewEnough("svn", "1.39"):
+        if self.slaveVersionIsOlderThan("svn", "1.39"):
             # the slave doesn't know to avoid re-using the same sourcedir
             # when the branch changes. We have no way of knowing which branch
             # the last build used, so if we're using a non-default branch and
@@ -1401,7 +1401,7 @@
             m = "slave is too old, does not know about darcs"
             raise BuildSlaveTooOldError(m)
 
-        if not self.slaveVersionNewEnough("darcs", "1.39"):
+        if self.slaveVersionIsOlderThan("darcs", "1.39"):
             if revision:
                 # TODO: revisit this once we implement computeSourceRevision
                 m = "0.6.6 slaves can't handle args['revision']"
@@ -1525,7 +1525,7 @@
             raise BuildSlaveTooOldError(m)
 
         # slave 1.28 and later understand 'revision'
-        if not self.slaveVersionNewEnough(cmd, "1.28"):
+        if self.slaveVersionIsOlderThan(cmd, "1.28"):
             if not self.alwaysUseLatest:
                 # we don't know whether our requested revision is the latest
                 # or not. If the tree does not change very quickly, this will
@@ -1535,7 +1535,7 @@
                 log.msg(m)
                 warnings.append(m + "\n")
 
-        if not self.slaveVersionNewEnough(cmd, "1.39"):
+        if self.slaveVersionIsOlderThan(cmd, "1.39"):
             # the slave doesn't know to avoid re-using the same sourcedir
             # when the branch changes. We have no way of knowing which branch
             # the last build used, so if we're using a non-default branch and





More information about the Commits mailing list