Create a function for explicit trunk changes (shouldn't be necessary, but...)
authordbs <dbs@9efc2488-bf62-4759-914b-345cdb29e865>
Mon, 31 Jan 2011 05:39:24 +0000 (05:39 +0000)
committerdbs <dbs@9efc2488-bf62-4759-914b-345cdb29e865>
Mon, 31 Jan 2011 05:39:24 +0000 (05:39 +0000)
Also untabify (augh) the file. Oh the whitespace!

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2161 9efc2488-bf62-4759-914b-345cdb29e865

examples/buildbot.cfg

index d6ad468..81ebda1 100644 (file)
@@ -1,5 +1,5 @@
 # -*- python -*-
-# ex: set syntax=python:
+# vim: set syntax=python:et:ts=4:sw=4:
 
 # This is a sample buildmaster config file. It must be installed as
 # 'master.cfg' in your buildmaster's base directory.
@@ -25,10 +25,19 @@ c['slavePortnum'] = XXX
 
 # the 'change_source' setting tells the buildmaster how it should find out
 # about source code changes.  Here we point to OpenSRF:
+def split_file_branches_trunk(path):
+    pieces = path.split('/')
+    if pieces[0] == 'trunk':
+        return ('trunk', '/'.join(pieces[1:]))
+    elif pieces[0] == 'branches':
+        return ('/'.join(pieces[0:2]),
+                '/'.join(pieces[2:]))
+    else:
+        return None
 
 from buildbot.changes import svnpoller
 c['change_source'] = svnpoller.SVNPoller(
-       project='OpenSRF',
+        project='OpenSRF',
         svnurl='svn://svn.open-ils.org/OpenSRF',
         split_file=svnpoller.split_file_branches,
         pollinterval=600)
@@ -98,34 +107,34 @@ def has_python_unit_test(step):
 
 factory.addStep(python_twisted.Trial(
     doStepIf=has_python_unit_test,
-       testpath="build",
-       tests="src/python/tests/json_test.py"))
+    testpath="build",
+    tests="src/python/tests/json_test.py"))
 
 # report on the Python code
 factory.addStep(python.PyLint(
-       env={"PYTHONPATH": ["src/python"]},
-       flunkOnFailure=False,
-       command=["pylint", 
-               "--output-format=parseable",
-               "src/python/opensrf.py",
-               "src/python/osrf/app.py",
-               "src/python/osrf/cache.py",
-               "src/python/osrf/conf.py",
-               "src/python/osrf/const.py",
-               "src/python/osrf/ex.py",
-               "src/python/osrf/gateway.py",
-               "src/python/osrf/http_translator.py",
-               "src/python/osrf/json.py",
-               "src/python/osrf/log.py",
-               "src/python/osrf/net_obj.py",
-               "src/python/osrf/net.py",
-               "src/python/osrf/server.py",
-               "src/python/osrf/ses.py",
-               "src/python/osrf/set.py",
-               "src/python/osrf/stack.py",
-               "src/python/osrf/system.py",
-               "src/python/osrf/xml_obj.py",
-               "src/python/osrf/apps/example.py"]))
+    env={"PYTHONPATH": ["src/python"]},
+    flunkOnFailure=False,
+    command=["pylint", 
+        "--output-format=parseable",
+        "src/python/opensrf.py",
+        "src/python/osrf/app.py",
+        "src/python/osrf/cache.py",
+        "src/python/osrf/conf.py",
+        "src/python/osrf/const.py",
+        "src/python/osrf/ex.py",
+        "src/python/osrf/gateway.py",
+        "src/python/osrf/http_translator.py",
+        "src/python/osrf/json.py",
+        "src/python/osrf/log.py",
+        "src/python/osrf/net_obj.py",
+        "src/python/osrf/net.py",
+        "src/python/osrf/server.py",
+        "src/python/osrf/ses.py",
+        "src/python/osrf/set.py",
+        "src/python/osrf/stack.py",
+        "src/python/osrf/system.py",
+        "src/python/osrf/xml_obj.py",
+        "src/python/osrf/apps/example.py"]))
 
 from buildbot.config import BuilderConfig