首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >windows上的subrepos出现Mercurial错误

windows上的subrepos出现Mercurial错误
EN

Stack Overflow用户
提问于 2011-11-21 19:21:52
回答 2查看 682关注 0票数 3

我对配置了传票的Mercurial有严重的问题。当我尝试提交或进行更新时,我得到以下错误:

代码语言:javascript
复制
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:

代码语言:javascript
复制
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。我在PATH中添加了svn和git,它工作得很好。当我尝试手动更新我的传票时,没有问题,svn up和git pull工作得很好。

EN

回答 2

Stack Overflow用户

发布于 2012-01-26 18:21:02

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

代码语言:javascript
复制
C:\Program Files (x86)\Git\bin

这将使git能够与Mercurial一起工作。

票数 3
EN

Stack Overflow用户

发布于 2011-11-25 20:21:36

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

代码语言:javascript
复制
# 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的输出,但这是特定于平台的详细信息。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/8210955

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档