पर गिट-पी 4 के साथ आयात करने में असमर्थ मैं गिट-पी 4 पायथन लिपि का उपयोग करके गिट के लिए एक पी 4 डिपो पथ आयात करने की कोशिश कर रहा हूं। मेरी पर्यावरण कॉन्फ़िगर करने के बाद (Git 1.7.1, अजगर 2.7, Windwos एक्सपी, p4 env चर) मैं Git-पी 4 स्क्रिप्ट चलाने की कोशिश की, निम्नलिखित ouptut geetting:विंडोज
F:\gitp4>c:\Python27\python.exe git-p4.py clone --destination=master //depot/quake/main/[email protected]
Reading pipe: git config git-p4.syncFromOrigin
Importing from //depot/quake/main/[email protected] 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 राज्यों (गिट rev-parse उत्पत्ति) पंक्ति को गिट कमांड चलाने की कोशिश करता हूं, तो आदेश सही तरीके से निष्पादित होता है।
धन्यवाद।
अद्यतन: ऐसा लगता है कि स्क्रिप्ट किसी भी प्रक्रिया को लॉन्च करने में असमर्थ है जिसका निष्पादन फ़ाइल निष्पादन पथ में नहीं है। मुझे लगता है कि खिड़कियों पर अजगर के साथ एक प्रारंभ मुद्दा है ...
ऐसा लगता है कि subprocess.Popen (["git"] का उपयोग ...) PATH चर को अनदेखा करता है। मेरे पास एक वर्कअराउंड है, जो एक पूर्ण-पथ बैच फ़ाइल को कॉल करना है जो गिट निष्पादन फ़ाइल – Tate
पर कॉल करता है धन्यवाद, यह मेरे लिए काम करता है। – Kevin
क्या आप स्पष्ट कर सकते हैं कि आपने वास्तव में क्या किया है, मैं इसे काम नहीं कर सकता :( – Restuta