[Buildbot-commits] buildbot/buildbot/steps source.py,1.2,1.3
Brian Warner
warner at users.sourceforge.net
Mon Sep 25 07:46:58 UTC 2006
Update of /cvsroot/buildbot/buildbot/buildbot/steps
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv17754/buildbot/steps
Modified Files:
source.py
Log Message:
[project @ initial support for Monotone, by Nathaniel Smith]
Original author: warner at lothar.com
Date: 2006-09-25 07:45:16
Index: source.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/steps/source.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- source.py 17 Sep 2006 20:35:49 -0000 1.2
+++ source.py 25 Sep 2006 07:46:56 -0000 1.3
@@ -899,3 +899,34 @@
cmd = LoggedRemoteCommand("p4sync", self.args)
self.startCommand(cmd)
+class Monotone(Source):
+ """Check out a revision from a monotone server at 'server_addr',
+ branch 'branch'. 'revision' specifies which revision id to check
+ out.
+
+ This step will first create a local database, if necessary, and then pull
+ the contents of the server into the database. Then it will do the
+ checkout/update from this database."""
+
+ name = "monotone"
+
+ def __init__(self, server_addr, branch, db_path="monotone.db",
+ monotone="monotone",
+ **kwargs):
+ Source.__init__(self, **kwargs)
+ self.args.update({"server_addr": server_addr,
+ "branch": branch,
+ "db_path": db_path,
+ "monotone": monotone})
+
+ def computeSourceRevision(self, changes):
+ if not changes:
+ return None
+ return changes[-1].revision
+
+ def startVC(self):
+ slavever = self.slaveVersion("monotone")
+ assert slavever, "slave is too old, does not know about monotone"
+ cmd = LoggedRemoteCommand("monotone", self.args)
+ self.startCommand(cmd)
+
More information about the Commits
mailing list