San*_*a K 1 migration git version-control perforce git-p4
我正在尝试将项目从Perforce迁移到Git.我正在使用git-p4
我的主要工具为我做繁重的工作,默认情况下在Windows上使用Git:
C:\Program Files\Git\mingw64\libexec\git-core\git-p4
.
继迁移Perforce公司在Windows到Git,我已经到了我执行我的命令克隆步骤:git p4 clone <PerforceRepo>
(其中P4是文件git-p4.py的别名)
我一直收到错误:
选项无效:-r.
C:\P4-To-Git>git p4 clone //depot/C:\build\mainline@all .
Importing from //depot/C:/build/mainline@all into .
Reinitialized existing Git repository in C:/P4-To-Git/.git/
Perforce client error:
p4 -h for usage.
Invalid option: -r.
Traceback (most recent call last):
File "C:\Program Files\Git\mingw64\libexec\git-core\git-p4", line 3840, in <module>
main()
File "C:\Program Files\Git\mingw64\libexec\git-core\git-p4", line 3834, in main
if not cmd.run(args):
File "C:\Program Files\Git\mingw64\libexec\git-core\git-p4", line 3706, in run
if not P4Sync.run(self, depotPaths):
File "C:\Program Files\Git\mingw64\libexec\git-core\git-p4", line 3546, in run
changes = p4ChangesForPaths(self.depotPaths, self.changeRange, self.changes_block_size)
File "C:\Program Files\Git\mingw64\libexec\git-core\git-p4", line 852, in p4ChangesForPaths
changeEnd = p4_last_change()
File "C:\Program Files\Git\mingw64\libexec\git-core\git-p4", line 317, in p4_last_change
return int(results[0]['change'])
KeyError: 'change'
Run Code Online (Sandbox Code Playgroud)
我已经查看了p4-git python文件,并且没有使用的地方-r
.有帮助吗?
尝试设置git-p4.retries
为0?
if retries > 0:
# Provide a way to not pass this option by setting git-p4.retries to 0
real_cmd += ["-r", str(retries)]
Run Code Online (Sandbox Code Playgroud)
或升级您的p4
可执行文件,使其支持-r
全局标志 - 在2012.2版本中添加了此选项:
Minor new functionality in 2012.2
#384638 *** ** *
The net.maxwait configurable can be used to specify a hard limit
(in seconds) on the maximum time that a connection will wait for
any single network send or receive to complete. The 'p4 sync'
command now supports a '-r' global flag to specify that the sync
command should be retried if a network error occurs.
Run Code Online (Sandbox Code Playgroud)