[Buildbot-commits] buildbot/buildbot/slave commands.py,1.29,1.30
Brian Warner
warner at users.sourceforge.net
Thu May 12 07:26:26 UTC 2005
Update of /cvsroot/buildbot/buildbot/buildbot/slave
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19353/buildbot/slave
Modified Files:
commands.py
Log Message:
Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-156
Creator: Brian Warner <warner at monolith.lothar.com>
Update Git, improve ShellCommand log messages
* buildbot/slave/commands.py (ShellCommand._startCommand): update
log messages to include more useful copies of the command being
run, the argv array, and the child command's environment.
(Git.doVCFull): update cg-close usage, patch from Brandon Philips.
Index: commands.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/slave/commands.py,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- commands.py 10 May 2005 08:10:53 -0000 1.29
+++ commands.py 12 May 2005 07:26:24 -0000 1.30
@@ -143,13 +143,10 @@
return self.deferred
def _startCommand(self):
- msg = "command '%s' in dir %s" % (self.command, self.workdir)
- if self.timeout:
- msg += " (timeout %d secs)" % self.timeout
- log.msg(" " + msg)
- self.sendStatus({'header': msg+"\n"})
- log.msg(" env is: %s" % self.environ)
+ log.msg("ShellCommand._startCommand")
if self.notreally:
+ self.sendStatus({'header': "command '%s' in dir %s" % \
+ (self.command, self.workdir)})
self.sendStatus({'header': "(not really)\n"})
self.finished(None, 0)
return
@@ -171,6 +168,31 @@
# self.stdin is handled in ShellCommandPP.connectionMade
+ # first header line is the command in plain text, argv joined with
+ # spaces. You should be able to cut-and-paste this into a shell to
+ # obtain the same results. If there are spaces in the arguments, too
+ # bad.
+ msg = " ".join(argv)
+ log.msg(" " + msg)
+ self.sendStatus({'header': msg+"\n"})
+
+ # then comes the secondary information
+ msg = "in dir %s" % (self.workdir,)
+ if self.timeout:
+ msg += " (timeout %d secs)" % (self.timeout,)
+ log.msg(" " + msg)
+ self.sendStatus({'header': msg+"\n"})
+
+ # then the argv array for resolving unambiguity
+ msg = "argv: %s" % (argv,)
+ log.msg(" " + msg)
+ self.sendStatus({'header': msg+"\n"})
+
+ # then the environment, since it sometimes causes problems
+ msg = "environment: %s" % (self.environ,)
+ log.msg(" " + msg)
+ self.sendStatus({'header': msg+"\n"})
+
self.process = reactor.spawnProcess(self.pp, argv[0], argv,
self.environ,
self.workdir,
@@ -842,7 +864,7 @@
def doVCFull(self):
d = os.path.join(self.builder.basedir, self.srcdir)
os.mkdir(d)
- command = ['cg-clone', self.repourl]
+ command = ['cg-clone', '-s', self.repourl]
c = ShellCommand(self.builder, command, d,
sendRC=False, timeout=self.timeout)
self.command = c
More information about the Commits
mailing list