Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/svn/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
git svn克隆:分支从repo/移动到repo/branchs/和;格式错误的XML:找不到元素";_Svn_Git Svn - Fatal编程技术网

git svn克隆:分支从repo/移动到repo/branchs/和;格式错误的XML:找不到元素";

git svn克隆:分支从repo/移动到repo/branchs/和;格式错误的XML:找不到元素";,svn,git-svn,Svn,Git Svn,使用Cygwin下的git 2.8.2和svn 1.9.4,当使用git svn clone克隆我们的存储库时,我遇到了一个难题: r3640 = eb94... (refs/remotes/svn/trunk) Found possible branch point: https://.../repo/<branchname> => https://.../repo/branches/<branchname>, 3641 Initializing parent:

使用Cygwin下的git 2.8.2和svn 1.9.4,当使用
git svn clone
克隆我们的存储库时,我遇到了一个难题:

r3640 = eb94... (refs/remotes/svn/trunk)
Found possible branch point: https://.../repo/<branchname> => https://.../repo/branches/<branchname>, 3641
Initializing parent: refs/remotes/svn/<branchname>@3641
Error from SVN, (175009): Malformed network data: The XML response contains invalid XML: Malformed XML: no element found
r3640=eb94。。。(参考/遥控/svn/中继)
找到可能的分支点:https://.../repo/ => https://.../repo/branches/, 3641
正在初始化父级:refs/remotes/svn/@3641
来自SVN(175009)的错误:格式错误的网络数据:XML响应包含无效的XML:格式错误的XML:未找到任何元素
观察结果#1:当使用
-r3600:HEAD
进行克隆时,即从最近足够多的提交进行克隆时,操作成功。冗长的实验表明,在问题提交之前从大约100个修订版开始克隆时,就会出现问题

观察结果#2:这似乎只发生在上述形式的分支中:错误地在回购根中创建了
repo/
,然后移动到
repo/branchs/


问题是什么以及如何解决?

解决方案:放大您的
--日志窗口大小
值(默认值:100)

警告:较大的窗口大小会禁止获取包含许多新添加文件的提交:

  • 在提交3961个新文件后,7000的窗口大小多次失败
  • 提交4927个新文件后,窗口大小为4000失败
受影响的提交中实际上有8430个新文件

这一切都在Cygwin下进行,我无法在Linux上重现这些问题,因此您的里程可能会有所不同


我注意到导致错误的修订距离与git svn fetch--log window size选项的默认值之间存在相似之处:两者都是100

使用4000的日志窗口解决了我的问题,我使用了更大的值来加速初始克隆/获取操作

我已经通过从有问题的版本之前的10个版本中克隆并使用
--log window size=1
--验证了这个问题,它再次失败

了解这是git svn的预期行为还是一个bug是很有意思的,因为
--log window size
被记录下来是为了加快克隆/获取操作,而不是为了解决一些分支问题