[Buildbot-commits] buildbot/buildbot/scripts tryclient.py,1.11,1.12

Brian Warner warner at users.sourceforge.net
Tue Apr 11 06:13:01 UTC 2006


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

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

add Mercurial support

	* buildbot/process/step.py (Mercurial): add Mercurial support
	* buildbot/slave/commands.py (Mercurial): same
	* buildbot/scripts/tryclient.py (MercurialExtractor): same
	* buildbot/test/test_vc.py (Mercurial): same, checkout over HTTP is
	not yet tested, but 'try' support *is* covered
	* docs/buildbot.texinfo (Mercurial): document it

	* buildbot/process/step.py (LoggedRemoteCommand.remoteUpdate): add
	some debugging messages (turned off)
	* buildbot/test/test_vc.py: improve debug messages


Index: tryclient.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/scripts/tryclient.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- tryclient.py	5 Nov 2005 22:58:09 -0000	1.11
+++ tryclient.py	11 Apr 2006 06:12:59 -0000	1.12
@@ -129,6 +129,20 @@
         d.addCallback(self.readPatch, 1)
         return d
 
+class MercurialExtractor(SourceStampExtractor):
+    patchlevel = 1
+    def getBaseRevision(self):
+        d = self.do(["hg", "identify"])
+        d.addCallback(self.parseStatus)
+        return d
+    def parseStatus(self, output):
+        m = re.search(r'^(\w+)', output)
+        self.baserev = m.group(0)
+    def getPatch(self, res):
+        d = self.do(["hg", "diff"])
+        d.addCallback(self.readPatch, self.patchlevel)
+        return d
+
 class DarcsExtractor(SourceStampExtractor):
     patchlevel = 1
     def getBaseRevision(self):
@@ -151,6 +165,8 @@
         e = BazExtractor(treetop, branch)
     elif vctype == "tla":
         e = TlaExtractor(treetop, branch)
+    elif vctype == "hg":
+        e = MercurialExtractor(treetop, branch)
     elif vctype == "darcs":
         e = DarcsExtractor(treetop, branch)
     else:





More information about the Commits mailing list