我在Windows 7 x64上运行。我遵循了Buildbot上的安装文档,并对我遇到的问题进行了一些研究,但还没有找到解决方案。当我建立部队时,一切都很好。我正在使用GitPoller。当它试图轮询更改时,会抛出异常;为什么?如果我能提供更多信息,请告诉我。以下是我在大师的twist.log上每5分钟得到的内容:
2014-10-09 00:19:53-0700 [-] while polling for changes
Traceback (most recent call last):
File "C:Python27libsite-packagesbuildbot-0.8.9-py2.7.eggbuildbotutilmisc.py", line 54, in start
d = self.method()
File "C:Python27libsite-packagesbuildbot-0.8.9-py2.7.eggbuildbotchangesbase.py", line 70, in doPoll
d = defer.maybeDeferred(self.poll)
File "C:Python27libsite-packagestwistedinternetdefer.py", line 139, in maybeDeferred
result = f(*args, **kw)
File "C:Python27libsite-packagestwistedinternetdefer.py", line 1237, in unwindGenerator
return _inlineCallbacks(None, gen, Deferred())
--- <exception caught here> ---
File "C:Python27libsite-packagestwistedinternetdefer.py", line 1099, in _inlineCallbacks
result = g.send(result)
File "C:Python27libsite-packagesbuildbot-0.8.9-py2.7.eggbuildbotchangesgitpoller.py", line 147, in poll
yield self._dovccmd('init', ['--bare', self.workdir])
File "C:Python27libsite-packagesbuildbot-0.8.9-py2.7.eggbuildbotchangesgitpoller.py", line 292, in _dovccmd
[command] + args, path=path, env=os.environ)
File "C:Python27libsite-packagestwistedinternetutils.py", line 176, in getProcessOutputAndValue
reactor)
File "C:Python27libsite-packagestwistedinternetutils.py", line 30, in _callProtocolWithDeferred
reactor.spawnProcess(p, executable, (executable,)+tuple(args), env, path)
File "C:Python27libsite-packagestwistedinternetposixbase.py", line 358, in spawnProcess
return Process(self, processProtocol, executable, args, env, path)
File "C:Python27libsite-packagestwistedinternet_dumbwin32proc.py", line 195, in __init__
raise OSError(pwte)
exceptions.OSError: (2, 'CreateProcess', 'The system cannot find the file specified.')
此外,这是我的配置文件的相关部分:
from buildbot.changes.gitpoller import GitPoller
c['change_source'] = []
c['change_source'].append(GitPoller(
repourl='https://github.com/solstice333/BuildbotTest.git',
branch='master',
pollinterval=300))
有什么想法吗?
我对HgPoller也有类似的问题。尝试指定git 的完整路径
c['change_source'].append(GitPoller(
gitbin='full/path/to/git.exe',
repourl='https://github.com/solstice333/BuildbotTest.git',
branch='master',
pollinterval=300))
我认为twisted有问题-这与相同的错误不起作用
PS Twisted使用win32process.CreateProcess和MSDN谈到它的第一个参数:字符串可以指定要执行的模块的完整路径和文件名,也可以指定部分名称。如果是部分名称,函数将使用当前驱动器和当前目录来完成规范。该函数将不使用搜索路径。
from twisted.internet import utils
utils.getProcessOutputAndValue("hg.exe", ['init', "test_dir"])