Mercurial自动更新问题
我们开始使用 Mercurial 进行源代码控制。我们已将 HGRC 配置文件配置为在推送到“中央”存储库后自动更新。 对于某些电脑,我们会收到此错误消息:
warning: changegroup hook exited with status -1
HGRC 看起来像这样:
[ui]
username=ADMIN
verbose=true
[hooks]
changegroup = hg update >&2
稍后我们手动执行更新,一切正常。
We are starting to use Mercurial for source control. We have configured the HGRC configuration file to do an auto update after we push to the "central" repository.
With some PCs we get this error msg:
warning: changegroup hook exited with status -1
HGRC looks like this:
[ui]
username=ADMIN
verbose=true
[hooks]
changegroup = hg update >&2
Later we perform the update manually and everything works right.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我有一个非常相似的问题。现在终于可以工作了:
粗体 cmd /c 会导致 cmd.exe 生成,它将按照我们的意愿执行 hg update,但现在 cmd.exe 的退出值将为 0
。故事:
设置:win 2008 服务器。
水银1.9.3
hgwebdir 通过普通 http,它是一个内部网络
错误:
有趣的是,我的错误不是您的情况中的 -1 ,而是
“警告:changegroup 挂钩已退出,状态为 1”
无论如何,更新没有执行。
我发现我可以将钩子放入 .hgrc 或 hgweb.config 中,问题在这里或那里是相同的。我最终将其放入 hgweb.config 中,如下所示,因此所有存储库都是自动提交的,这比一直拥有这个松散的分支要好得多。我想要自动提交的主要原因是 vcs 和 vcs 上的存储库。构建服务器现在拥有最新版本,这使得管理任务变得更加简单。
I had a very simmilar issue. This finally works now:
The bold cmd /c causes cmd.exe to spawn which will execute hg update as we want it to, but now the exit value from cmd.exe will be 0.
Longer Story:
setup: win 2008 server.
mercurial 1.9.3
hgwebdir via plain http, its an internal network
error:
my error was funnily not the -1 as in your case but
"warning: changegroup hook exited with status 1"
Anyway, the update was not performed.
I found out that I can put the hooks into either .hgrc or into hgweb.config the problem was the same here or there. I finally put it into hgweb.config as below, so all repositories are auto commiting, which is way better than having this loose branch all the time. The main reason I wanted auto commit is that the respositories on the vcs & build server hold now the latest version which makes admin tasks often simpler.
它可能与用户实际执行挂钩,这可能不是具有正确权限的人。
您是否有 IIS Web 服务器来管理您的 Mercurial 存储库?
(来自线程:)
It might be related with the user actually executing the hook, which might not be the one with the correct privileges.
Do you have a IIS webserver managing your Mercurial repos?
(from the thread:)