Ртутная ошибка с подпунктами на окнах - PullRequest
3 голосов
/ 21 ноября 2011

У меня критическая проблема с 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 работают хорошо.

Ответы [ 2 ]

3 голосов
/ 26 января 2012

Если каталог Git для Windows (mysysgit) в вашем пути - C:\Program Files (x86)\Git\cmd, попробуйте изменить его на:

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

Это позволит git работать с Mercurial.

1 голос
/ 25 ноября 2011

Для отладки проблемы пути вы можете использовать следующий файл

# 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 перед статусом выхода, но это детали для платформы.

...