git-p4 python スクリプトを使用して、p4 デポ パスを git にインポートしようとしています。環境 (git 1.7.1、python 2.7、Windwos XP、p4 環境変数) を構成した後、git-p4 スクリプトを実行して、次の出力を取得しようとしました。
F:\gitp4>c:\Python27\python.exe git-p4.py clone --destination=master //depot/quake/main/...@all
Reading pipe: git config git-p4.syncFromOrigin
Importing from //depot/quake/main/...@all into master
Initialized empty Git repository in F:/gitp4/master/.git/
Traceback (most recent call last):
File "git-p4.py", line 1926, in <module>
main()
File "git-p4.py", line 1921, in main
if not cmd.run(args):
File "git-p4.py", line 1798, in run
if not P4Sync.run(self, depotPaths):
File "git-p4.py", line 1501, in run
self.hasOrigin = originP4BranchesExist()
File "git-p4.py", line 439, in originP4BranchesExist
return gitBranchExists("origin") or gitBranchExists("origin/p4") or gitBranchExists("origin/p4/master")
File "git-p4.py", line 332, in gitBranchExists
stderr=subprocess.PIPE, stdout=subprocess.PIPE);
File "c:\Python27\lib\subprocess.py", line 672, in __init__
errread, errwrite)
File "c:\Python27\lib\subprocess.py", line 882, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
ここで何が起こっているか知っている人はいますか?332行目にあるgitコマンド(git rev-parse origin)をコマンドラインシェルから実行しようとすると、コマンドは正しく実行されます。
ありがとう。
更新:スクリプトは、exec ファイルが実行パスにないプロセスを起動できないようです。Windows上のPythonの初期化の問題だと思います...