运行 SVNPoller 时生成错误消息

发布于 2024-10-01 10:01:10 字数 2460 浏览 2 评论 0原文

我正在尝试在我的组织中设置 Buildbot,但 SVNPoller 出现问题。

每当 subversion 存储库更改时,SVNPoller 都会正确地识别这一点,但随后会失败并显示以下错误消息:

SVNPoller 失败 [失败实例:Traceback: :changes.project 可能不为 NULL

我很确定我犯了一个错误,但此错误消息并没有真正帮助,因此我们将不胜感激。

ma​​ster.cfg:


svn_poller = SVNPoller(
                    svnurl=source_code_svn_url,
                    pollinterval=60*10, # seconds
                    svnuser='job_guest',
                    svnpasswd='job_guest',
                    svnbin='/usr/bin/svn'
)
c['change_source'] = [ svn_poller ]

twistd.log


2010-11-11 14:24:01+0100 [-] SVNPoller polling
2010-11-11 14:24:03+0100 [-] svnPoller: _process_changes 34177 .. 34178
2010-11-11 14:24:03+0100 [-] Adding change revision 34178
2010-11-11 14:24:03+0100 [-] adding change, who doberkofler, 1 files, rev=34178, branch=None, repository=http://10.43.1.11/svn/job/ljs_app/trunk, comments test, category None, project None
2010-11-11 14:24:03+0100 [-] SVNPoller failed [Failure instance: Traceback: <class 'pysqlite2.dbapi2.IntegrityError'>: changes.project may not be NULL
            /usr/lib/python2.5/site-packages/twisted/internet/defer.py:312:_startRunCallbacks
            /usr/lib/python2.5/site-packages/twisted/internet/defer.py:328:_runCallbacks
            /usr/lib/python2.5/site-packages/twisted/internet/defer.py:289:_continue
            /usr/lib/python2.5/site-packages/twisted/internet/defer.py:285:unpause
            --- <exception caught here> ---
            /usr/lib/python2.5/site-packages/twisted/internet/defer.py:328:_runCallbacks
            /usr/lib/python2.5/site-packages/buildbot/changes/svnpoller.py:504:submit_changes
            /usr/lib/python2.5/site-packages/buildbot/changes/manager.py:114:addChange
            /usr/lib/python2.5/site-packages/buildbot/master.py:1146:addChange
            /usr/lib/python2.5/site-packages/buildbot/db/connector.py:308:addChangeToDatabase
            /usr/lib/python2.5/site-packages/buildbot/db/connector.py:212:runInteractionNow
            /usr/lib/python2.5/site-packages/buildbot/db/connector.py:237:_runInteractionNow
            /usr/lib/python2.5/site-packages/buildbot/db/connector.py:326:_txn_addChangeToDatabase
            /usr/lib/python2.5/site-packages/buildbot/db/dbspec.py:105:execute
            ]
2010-11-11 14:34:01+0100 [-] SVNPoller polling

I'm trying to setup Buildbot in my organization but have a problem with the SVNPoller.

Whenever the subversion repository changes the SVNPoller correctly keeps recognizes this but then fails with the following errors message:

SVNPoller failed [Failure instance: Traceback: : changes.project may not be NULL

I'm pretty sure that I made a mistake but this error message just doesn't really help, so any help is appreciated.

master.cfg:


svn_poller = SVNPoller(
                    svnurl=source_code_svn_url,
                    pollinterval=60*10, # seconds
                    svnuser='job_guest',
                    svnpasswd='job_guest',
                    svnbin='/usr/bin/svn'
)
c['change_source'] = [ svn_poller ]

twistd.log


2010-11-11 14:24:01+0100 [-] SVNPoller polling
2010-11-11 14:24:03+0100 [-] svnPoller: _process_changes 34177 .. 34178
2010-11-11 14:24:03+0100 [-] Adding change revision 34178
2010-11-11 14:24:03+0100 [-] adding change, who doberkofler, 1 files, rev=34178, branch=None, repository=http://10.43.1.11/svn/job/ljs_app/trunk, comments test, category None, project None
2010-11-11 14:24:03+0100 [-] SVNPoller failed [Failure instance: Traceback: <class 'pysqlite2.dbapi2.IntegrityError'>: changes.project may not be NULL
            /usr/lib/python2.5/site-packages/twisted/internet/defer.py:312:_startRunCallbacks
            /usr/lib/python2.5/site-packages/twisted/internet/defer.py:328:_runCallbacks
            /usr/lib/python2.5/site-packages/twisted/internet/defer.py:289:_continue
            /usr/lib/python2.5/site-packages/twisted/internet/defer.py:285:unpause
            --- <exception caught here> ---
            /usr/lib/python2.5/site-packages/twisted/internet/defer.py:328:_runCallbacks
            /usr/lib/python2.5/site-packages/buildbot/changes/svnpoller.py:504:submit_changes
            /usr/lib/python2.5/site-packages/buildbot/changes/manager.py:114:addChange
            /usr/lib/python2.5/site-packages/buildbot/master.py:1146:addChange
            /usr/lib/python2.5/site-packages/buildbot/db/connector.py:308:addChangeToDatabase
            /usr/lib/python2.5/site-packages/buildbot/db/connector.py:212:runInteractionNow
            /usr/lib/python2.5/site-packages/buildbot/db/connector.py:237:_runInteractionNow
            /usr/lib/python2.5/site-packages/buildbot/db/connector.py:326:_txn_addChangeToDatabase
            /usr/lib/python2.5/site-packages/buildbot/db/dbspec.py:105:execute
            ]
2010-11-11 14:34:01+0100 [-] SVNPoller polling

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

肩上的翅膀 2024-10-08 10:01:10

我找到了导致错误的原因:使用 SVNPoller 时,必须同时设置项目参数!

svn_poller = SVNPoller(
                    project='project',        
                    svnurl=source_code_svn_url,
                    pollinterval=60*10, # seconds
                    svnuser='job_guest',
                    svnpasswd='job_guest',
                    svnbin='/usr/bin/svn'
)
c['change_source'] = [ svn_poller ]

I found what caused the error: when using SVNPoller it is imeperative to also set the project parameter!

svn_poller = SVNPoller(
                    project='project',        
                    svnurl=source_code_svn_url,
                    pollinterval=60*10, # seconds
                    svnuser='job_guest',
                    svnpasswd='job_guest',
                    svnbin='/usr/bin/svn'
)
c['change_source'] = [ svn_poller ]
梦与时光遇 2024-10-08 10:01:10

事实上,如果您使用 0.8 或更高版本,即使您不想,它们也会要求您指定一个项目;因为没有默认值。

只需按照其他用户的建议,在轮询器中添加 project = 'myproject' 即可,然后就可以开始了。

Indeed, if you are using 0.8 or higher, they require you to specify a project even if you don't want to; since there is no default.

Just add the project = 'myproject' in the poller, as the other user suggested too, and you should be good to go.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文