[Buildbot-commits] buildbot/buildbot/slave commands.py,1.38,1.39

Brian Warner warner at users.sourceforge.net
Tue Aug 16 20:38:03 UTC 2005


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

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

make Darcs get-revision work under python2.2 too

	* buildbot/slave/commands.py (Darcs.doVCFull): fix get-revision
	for Darcs to not use the tempfile module, so it works under
	python-2.2 too. We really didn't need the full cleverness of that
	module, since the slave has exclusive control of its own builddir.


Index: commands.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/slave/commands.py,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- commands.py	15 Aug 2005 18:05:08 -0000	1.38
+++ commands.py	16 Aug 2005 20:38:01 -0000	1.39
@@ -999,9 +999,8 @@
                    '--repo-name', self.srcdir]
         if self.revision:
             # write the context to a file
-            import tempfile  # requires python-2.3
-            fd,n = tempfile.mkstemp(dir=self.builder.basedir)
-            f = os.fdopen(fd, "w")
+            n = os.path.join(self.builder.basedir, ".darcs-context")
+            f = open(n, "w") # TODO: should this be 'wt'?
             f.write(self.revision)
             f.close()
             # tell Darcs to use that context





More information about the Commits mailing list