git-p4:没有这样的文件或目录

  • 本文关键字:文件 git-p4 git perforce
  • 更新时间 :
  • 英文 :


我正在尝试在Linux上使用Git-P4,并将Git-P4.Py添加到我的.gitConfig中。但是,在克隆上,我得到了这个错误:

math@math:/mnt/d$ git p4 clone //depot/path/main@all
Importing from //depot/path/main@all into main
Reinitialized existing Git repository in /mnt/d/main/.git/
Traceback (most recent call last):
  File "/home/math/bin/git-p4.py", line 3703, in <module>
    main()
  File "/home/math/bin/git-p4.py", line 3697, in main
    if not cmd.run(args):
  File "/home/math/bin/git-p4.py", line 3571, in run
    if not P4Sync.run(self, depotPaths):
  File "/home/math/bin/git-p4.py", line 3411, in run
    changes = p4ChangesForPaths(self.depotPaths, self.changeRange, self.changes_block_size)
  File "/home/math/bin/git-p4.py", line 807, in p4ChangesForPaths
    changeEnd = p4_last_change()
  File "/home/math/bin/git-p4.py", line 266, in p4_last_change
    results = p4CmdList(["changes", "-m", "1"])
  File "/home/math/bin/git-p4.py", line 492, in p4CmdList
    stdout=subprocess.PIPE)
  File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

应该存在什么目录或文件?我设置了以下ENV变量:P4 -HOST,P4PASSWD,P4PORT,P4USER。

立即遇到相同的问题。是的,@BryanPendleton是对的:您只需要在$PATH中添加p4

最新更新