[Checkins] SVN: gocept.bsquare/branches/pcardune-setup/ added more options to configure

Adam Groszer agroszer at gmail.com
Mon Apr 7 10:51:43 EDT 2008


Log message for revision 85149:
  added more options to configure

Changed:
  A   gocept.bsquare/branches/pcardune-setup/CHANGES.txt
  U   gocept.bsquare/branches/pcardune-setup/src/gocept/bsquare/master.py

-=-
Added: gocept.bsquare/branches/pcardune-setup/CHANGES.txt
===================================================================
--- gocept.bsquare/branches/pcardune-setup/CHANGES.txt	                        (rev 0)
+++ gocept.bsquare/branches/pcardune-setup/CHANGES.txt	2008-04-07 14:51:42 UTC (rev 85149)
@@ -0,0 +1,8 @@
+0.1.0 2008-04-07
+----------------
+Added the options to configure:
+- svnuser = None, svnpassword = None,
+- pollinterval = 30,
+- poller = None,
+- makefactory = make_factory
+to help override them
\ No newline at end of file


Property changes on: gocept.bsquare/branches/pcardune-setup/CHANGES.txt
___________________________________________________________________
Name: svn:keywords
   + Date Author Id Revision
Name: svn:eol-style
   + native

Modified: gocept.bsquare/branches/pcardune-setup/src/gocept/bsquare/master.py
===================================================================
--- gocept.bsquare/branches/pcardune-setup/src/gocept/bsquare/master.py	2008-04-07 14:09:54 UTC (rev 85148)
+++ gocept.bsquare/branches/pcardune-setup/src/gocept/bsquare/master.py	2008-04-07 14:51:42 UTC (rev 85149)
@@ -48,7 +48,10 @@
     return f
 
 
-def configure(svn_url, http_port=8010, allowForce=False):
+def configure(svn_url, http_port=8010, allowForce=False,
+              svnuser = None, svnpassword = None,
+              pollinterval = 30,
+              poller = None, makefactory = make_factory):
     """Creates a buildout master configuration.
 
     The configuration returned is almost functional. You just need to add
@@ -57,16 +60,24 @@
     """
     c = {}
     c['slavePortnum'] = 8989
-    c['change_source'] = SVNPoller(svn_url, split_file=split_file, pollinterval=30)
-    c['schedulers'] = [] 
+    if poller is None:
+        c['change_source'] = SVNPoller(svn_url,
+                                       split_file=split_file,
+                                       svnuser=svnuser,
+                                       svnpassword=svnpassword,
+                                       pollinterval=pollinterval)
+    else:
+        c['change_source'] = poller
+    c['schedulers'] = []
     c['builders'] = []
 
     slow_lock = locks.SlaveLock("cpu", maxCount=2)
 
     projects = open("project-list.cfg", "rb").readlines()
     projects = [x.strip() for x in projects]
+
     for project in projects:
-        f = make_factory(svn_url)
+        f = makefactory(svn_url)
         c['builders'].append({
             'name': project,
             'slavename': 'local',
@@ -77,7 +88,7 @@
         del f
 
         c['schedulers'].append(Scheduler(
-            project, "%s/trunk" % project, 30, [project]))
+            project, "%s/trunk" % project, pollinterval+10, [project]))
         c['schedulers'].append(Nightly(
             "%s nightly" % project, [project], hour=[3],
             branch="%s/trunk" % project))



More information about the Checkins mailing list