Windows 上的子存储库出现 Mercurial 错误

发布于 2024-12-17 08:33:15 字数 1730 浏览 1 评论 0原文

我在使用子存储库配置的 Mercurial 时遇到严重问题。当我尝试提交或进行更新时,出现以下错误:

hg commit -m "commit" --traceback
Traceback (most recent call last):
File "mercurial\dispatch.pyc", line 87, in _runcatch
File "mercurial\dispatch.pyc", line 679, in _dispatch
File "mercurial\dispatch.pyc", line 454, in runcommand
File "mercurial\dispatch.pyc", line 733, in _runcommand
File "mercurial\dispatch.pyc", line 687, in checkargs
File "mercurial\dispatch.pyc", line 676, in <lambda>
File "mercurial\util.pyc", line 385, in check
File "mercurial\commands.pyc", line 1092, in commit
File "mercurial\cmdutil.pyc", line 1189, in commit
File "mercurial\commands.pyc", line 1087, in commitfunc
File "mercurial\localrepo.pyc", line 955, in commit
File "mercurial\subrepo.pyc", line 847, in dirty
File "mercurial\subrepo.pyc", line 783, in _gitisbare
File "mercurial\subrepo.pyc", line 717, in _gitcommand
File "mercurial\subrepo.pyc", line 721, in _gitdir
File "mercurial\subrepo.pyc", line 737, in _gitnodir
File "subprocess.pyc", line 623, in __init__
File "subprocess.pyc", line 833, in _execute_child
WindowsError: [Error 2] The system cannot find the file specified
abort: The system cannot find the file specified

我的 .hgsub:

webdriver/vendor/webdriver = [svn]http://php-webdriver-bindings.googlecode.com/svn/trunk/trunk/phpwebdriver/
app/vendor/bundles/Knp/Bundle/ZendCacheBundle = [git]http://github.com/knplabs/KnpZendCacheBundle.git
app/vendor/Zend/Cache = [git]http://github.com/knplabs/zend-cache.git
app/vendor/Zend/Filter = [git]http://github.com/knplabs/zend-filter.git

我使用 Windows XP 和 Mercurial 1.9.2。我已将 svn 和 git 添加到 PATH 中,并且运行良好。 当我尝试手动更新我的子存储库时没有问题,svn up 和 git pull 工作得很好。

I have critial problem with Mercurial configured with subrepos. When I try to commit or make update I get following error:

hg commit -m "commit" --traceback
Traceback (most recent call last):
File "mercurial\dispatch.pyc", line 87, in _runcatch
File "mercurial\dispatch.pyc", line 679, in _dispatch
File "mercurial\dispatch.pyc", line 454, in runcommand
File "mercurial\dispatch.pyc", line 733, in _runcommand
File "mercurial\dispatch.pyc", line 687, in checkargs
File "mercurial\dispatch.pyc", line 676, in <lambda>
File "mercurial\util.pyc", line 385, in check
File "mercurial\commands.pyc", line 1092, in commit
File "mercurial\cmdutil.pyc", line 1189, in commit
File "mercurial\commands.pyc", line 1087, in commitfunc
File "mercurial\localrepo.pyc", line 955, in commit
File "mercurial\subrepo.pyc", line 847, in dirty
File "mercurial\subrepo.pyc", line 783, in _gitisbare
File "mercurial\subrepo.pyc", line 717, in _gitcommand
File "mercurial\subrepo.pyc", line 721, in _gitdir
File "mercurial\subrepo.pyc", line 737, in _gitnodir
File "subprocess.pyc", line 623, in __init__
File "subprocess.pyc", line 833, in _execute_child
WindowsError: [Error 2] The system cannot find the file specified
abort: The system cannot find the file specified

My .hgsub:

webdriver/vendor/webdriver = [svn]http://php-webdriver-bindings.googlecode.com/svn/trunk/trunk/phpwebdriver/
app/vendor/bundles/Knp/Bundle/ZendCacheBundle = [git]http://github.com/knplabs/KnpZendCacheBundle.git
app/vendor/Zend/Cache = [git]http://github.com/knplabs/zend-cache.git
app/vendor/Zend/Filter = [git]http://github.com/knplabs/zend-filter.git

I use Windows XP and Mercurial 1.9.2. I have svn and git added to PATH and it works good.
When I try to update my subrepos manually there is no problem, svn up and git pull works good.

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

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

发布评论

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

评论(2

永言不败 2024-12-24 08:33:15

如果路径中的 Git for Windows (mysysgit) 目录是C:\Program Files (x86)\Git\cmd,尝试将其更改为:

C:\Program Files (x86)\Git\bin

这将使 git 能够与 Mercurial 一起使用。

If the Git for Windows (mysysgit) directory in your path is C:\Program Files (x86)\Git\cmd, try changing it to:

C:\Program Files (x86)\Git\bin

This will enable git to work with Mercurial.

爱格式化 2024-12-24 08:33:15

要调试路径问题,您可以使用以下文件

# qnddebug.py
import os
import sys
import subprocess

print os.environ['PATH']
print subprocess.call(['git', '--version'])
sys.exit(23)

并使用 hg --config extensions.foo=qnddebug.py 运行它。然后您在第一行中看到 Mercurial 使用哪个路径来查找程序。最后一行是 git 调用的错误代码,并且必须为 0。退出状态之前的行中可能有 git --version 的输出,但这是特定于平台的详细信息。

To debug your path problem, you can use the following file

# qnddebug.py
import os
import sys
import subprocess

print os.environ['PATH']
print subprocess.call(['git', '--version'])
sys.exit(23)

and run it with hg --config extensions.foo=qnddebug.py. Then you see in the first line which path mercurial uses to find programs. The last line is error-code of the git call, and must be 0. Maybe there is the output of git --version in the line before the exit status, but this is a platform-specific detail.

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