Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/mercurial/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Mercurial Bugzilla Hook只能工作一次_Mercurial_Hook_Bugzilla - Fatal编程技术网

Mercurial Bugzilla Hook只能工作一次

Mercurial Bugzilla Hook只能工作一次,mercurial,hook,bugzilla,Mercurial,Hook,Bugzilla,为了集成我们的Mercurial存储库和bug跟踪器(Bugzilla 4.0.1),我设置了服务器端hgrc文件,如下所示: [extensions] hgext.bugzilla= [hooks] incoming.bugzilla=python:hgext.bugzilla.hook [bugzilla] bzurl=http://localhost/bugzilla user=some.user@this.domain password=password version=xmlrpc

为了集成我们的Mercurial存储库和bug跟踪器(Bugzilla 4.0.1),我设置了服务器端hgrc文件,如下所示:

[extensions]
hgext.bugzilla=

[hooks]
incoming.bugzilla=python:hgext.bugzilla.hook

[bugzilla]
bzurl=http://localhost/bugzilla
user=some.user@this.domain
password=password
version=xmlrpc
hgweb=http://this-server:65432/
template=Changeset {node|short} in {root|basename}.\nDetails siehe {hgweb}{webroot}?cmd=changeset;node={node|short}\nBeschreibung:\n\t{desc|tabindent}

[usermap]
committer_email=bugzilla_user_name

[web]
push_ssl=False
allow_push=*
baseurl=http://this-server:65432
Mercurial已设置为此服务器(端口65432)提供服务

现在,在启动hg serve之后,第一次推送将得到很好的处理。在提交消息中找到的所有bug引用都将生成Bugzilla注释。但是,在至少存在一个bug引用的每次后续推送中,都会向用户显示以下错误消息:

pushing to http://this-server:65432/
searching for changes
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 1 changesets with 1 changes to 1 files
remote: error: incoming.bugzilla hook failed: Bugzilla error:
有几次,人们注意到了这一信息:

remote: error: incoming.bugzilla hook failed: Bugzilla error: [Errno 54] Connection reset by peer
bugzilla中不创建任何注释。重新启动hg将使它再次正常工作

我还尝试用参数
-A启动Mercurial服务器-E…
让它创建访问和错误日志。访问日志显示每个请求的相同交互类型,无论是否成功:

192.168.117.78 - - [20/Feb/2013 10:19:03] "GET /?cmd=capabilities HTTP/1.1" 200 -
192.168.117.78 - - [20/Feb/2013 10:19:03] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3Dc3ee38280c255a62c2742304622d8fcf29959863+b8cbc9948834a83b9a8f6dd9f1b96d5f39224324+54f5e40379910d6026b8656fe0982bb5b7e9e22b
192.168.117.78 - - [20/Feb/2013 10:19:03] "GET /?cmd=branchmap HTTP/1.1" 200 -
192.168.117.78 - - [20/Feb/2013 10:19:03] "GET /?cmd=branchmap HTTP/1.1" 200 -
192.168.117.78 - - [20/Feb/2013 10:19:04] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks
192.168.117.78 - - [20/Feb/2013 10:19:09] "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=686173686564+be8d19f7ab04e73ad36715ec876b4dd74384a920
192.168.117.78 - - [20/Feb/2013 10:19:09] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases
192.168.117.78 - - [20/Feb/2013 10:19:09] "POST /?cmd=pushkey HTTP/1.1" 200 - x-hgarg-1:key=54f5e40379910d6026b8656fe0982bb5b7e9e22b&namespace=phases&new=0&old=1
192.168.117.78 - - [20/Feb/2013 10:19:10] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks
192.168.117.78 - - [20/Feb/2013 10:20:04] "GET /?cmd=capabilities HTTP/1.1" 200 -
192.168.117.78 - - [20/Feb/2013 10:20:05] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3Dc3ee38280c255a62c2742304622d8fcf29959863+b8cbc9948834a83b9a8f6dd9f1b96d5f39224324+7fbb4c09e39db549ed01532785e80eda480e8862
192.168.117.78 - - [20/Feb/2013 10:20:05] "GET /?cmd=branchmap HTTP/1.1" 200 -
192.168.117.78 - - [20/Feb/2013 10:20:05] "GET /?cmd=branchmap HTTP/1.1" 200 -
192.168.117.78 - - [20/Feb/2013 10:20:05] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks
192.168.117.78 - - [20/Feb/2013 10:20:05] "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=686173686564+f71bb72e20c8f91b9d0ca3b5fbdef2aac667c265
192.168.117.78 - - [20/Feb/2013 10:20:05] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases
192.168.117.78 - - [20/Feb/2013 10:20:06] "POST /?cmd=pushkey HTTP/1.1" 200 - x-hgarg-1:key=7fbb4c09e39db549ed01532785e80eda480e8862&namespace=phases&new=0&old=1
192.168.117.78 - - [20/Feb/2013 10:20:06] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks
错误日志为空


如何进一步诊断此问题?

hg serve调用不是长期使用的。这是为了在局域网上的伙伴之间“嘿,克隆这个我开始的东西”。从

除了需要在几分钟内发布存储库的临时情况外,不建议使用它,例如从笔记本电脑中提取更改


我怀疑,如果你启动一个真正的wsgi容器,事情就会成功。我没有使用bugzilla钩子,但我猜它不会自行清理,因为它预期会在wsgi容器或命令行调用中被清除。

你是对的。我已经通过wsgi建立了hgweb,现在集成工作起来很有魅力。我不需要改变挂钩,显然从一开始就设置正确。Mercurial和mod_wsgi都有非常好的文档,我向大家推荐这种设置。