Mercurial自动更新问题 [英] Mercurial auto update problem

查看:355
本文介绍了Mercurial自动更新问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们开始使用Mercurial进行源代码管理。我们已将HGRC配置文件配置为在推送到中央存储库后执行自动更新。
对于一些电脑我们得到这个错误msg:

 警告:changegroup hook退出状态-1 

HGRC如下所示:

  [ui] 
username = ADMIN
verbose = true

[hooks]
changegroup = hg update>& 2



后来我们手动执行更新,一切正常。

解决方案

这可能与用户有关实际执行钩子,这可能不是具有正确权限的那个。



您有一个IIS网络服务器管理您的Mercurial仓库吗?



(来自主题:)


根据Mercurial / IIS的经验,




  • (a)运行简单的非HG命令是否正常工作? cmd.exe 的权限会影响进程外python钩子。

  • (b)例如' python -cimport sys; sys.exit(0)'work?

  • 到目前为止,你可以确认进程正在以你认为运行的
    用户身份运行,用一个钩子来执行:


< blockquote>

  import win32api 
username = win32api.GetUserName()
(写入文件的用户名, )


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.

解决方案

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:)

From experience with Mercurial/IIS, things I'd recommend trying:

  • (a) Does running a simple non-HG command work? Permissions on cmd.exe will affect out-of-process python hooks.
  • (b) Does a simple hook like 'python -c "import sys; sys.exit(0)"' work?
  • (c) If you make it this far, can you confirm that the process is running as the user you think it's running as, with a hook that does something like:

import win32api
username = win32api.GetUserName()
(write username to a file so you can read it)

这篇关于Mercurial自动更新问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆