[cig-commits] r6862 - cs/buildbot/trunk/buildbot

leif at geodynamics.org leif at geodynamics.org
Fri May 11 18:37:43 PDT 2007


Author: leif
Date: 2007-05-11 18:37:42 -0700 (Fri, 11 May 2007)
New Revision: 6862

Modified:
   cs/buildbot/trunk/buildbot/projects.py
   cs/buildbot/trunk/buildbot/scheduler.py
Log:
Fixed my muddled "root" changes to AnyBranchScheduler from r5895.


Modified: cs/buildbot/trunk/buildbot/projects.py
===================================================================
--- cs/buildbot/trunk/buildbot/projects.py	2007-05-12 01:02:14 UTC (rev 6861)
+++ cs/buildbot/trunk/buildbot/projects.py	2007-05-12 01:37:42 UTC (rev 6862)
@@ -4,9 +4,10 @@
 
 class Project(util.ComparableMixin):
 
-    compare_attrs = ['name', 'url', 'owners']
+    compare_attrs = ['name', 'url', 'owners', 'root']
 
-    def __init__(self, name, url, owners):
+    def __init__(self, name, url, owners, root):
         self.name = name
         self.url = url
         self.owners = owners
+        self.root = root

Modified: cs/buildbot/trunk/buildbot/scheduler.py
===================================================================
--- cs/buildbot/trunk/buildbot/scheduler.py	2007-05-12 01:02:14 UTC (rev 6861)
+++ cs/buildbot/trunk/buildbot/scheduler.py	2007-05-12 01:37:42 UTC (rev 6862)
@@ -198,10 +198,10 @@
     schedulerFactory = Scheduler
     fileIsImportant = None
 
-    compare_attrs = ('name', 'roots', 'branches', 'treeStableTimer', 'builderNames',
+    compare_attrs = ('name', 'branches', 'treeStableTimer', 'builderNames',
                      'fileIsImportant')
 
-    def __init__(self, name, roots, branches, treeStableTimer, builderNames,
+    def __init__(self, name, branches, treeStableTimer, builderNames,
                  fileIsImportant=None):
         """
         @param name: the name of this Scheduler
@@ -234,12 +234,7 @@
         for b in builderNames:
             assert isinstance(b, str)
         self.builderNames = builderNames
-        self.roots = roots
-        if self.roots == []:
-            log.msg("AnyBranchScheduler %s: roots=[], so we will ignore "
-                    "all roots, and never trigger any builds. Please set "
-                    "roots=None to mean 'all roots'" % self)
-        self.branches = branches
+        self.branches = [root + branch for root, branch in branches]
         if self.branches == []:
             log.msg("AnyBranchScheduler %s: branches=[], so we will ignore "
                     "all branches, and never trigger any builds. Please set "
@@ -268,14 +263,11 @@
 
     def addChange(self, change):
         root = change.root
-        if self.roots is not None and root not in self.roots:
-            log.msg("%s ignoring off-root %s" % (self, change))
-            return
         branch = change.branch
-        if self.branches is not None and branch not in self.branches:
+        path = root + branch
+        if self.branches is not None and path not in self.branches:
             log.msg("%s ignoring off-branch %s" % (self, change))
             return
-        path = root + branch
         s = self.schedulers.get(path)
         if not s:
             if branch:



More information about the cig-commits mailing list