Git svn clone:是否可以在错误后恢复XML格式错误:找不到元素? [英] Git svn clone: Is it possible to resume after error Malformed XML: no element found?

查看:93
本文介绍了Git svn clone:是否可以在错误后恢复XML格式错误:找不到元素?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 git svn 通过以下命令(从重要的迁移到仅使用Git的迁移)从大型Subversion仓库进行从Subversion到Git的单向迁移:/p>

I'm attempting to do a one-way from subversion to Git migration of a large subversion repository using git svn with the following command (IMPORTANT after the migration only Git will be used):

git svn clone --no-minimize-url --trunk=/trunk/GBI --branches=/branches/GBI --tags=/tags/GBI --authors-file=authors.txt https://yyy/svn-repos/zzz/ GBI

几个小时后,克隆过程崩溃,并显示以下错误:

After couple of hours running, the clone process crashes with the following error:

r79791 = 00349b8063f90447ea8a040751cd2a40e74b74f3 (refs/remotes/origin/trunk)
Error from SVN, (175009): Malformed network data: The XML response contains invalid XML: Malformed XML: no element found

然后我想也许有一个聪明的方法可以在违规的修订之后立即恢复该过程……这可能吗?

Then I thought that maybe there is a clever way to resume the process right after the offending revision ... is that possible?

有什么想法首先导致此错误?

Any ideas what causes this error in the first place?

这个问题的答案建议使用-log-window-size 来防止此问题的发生...我可以添加该选项并从失败的修订版中重试吗?是这个问题,然后是 git svn 内存使用问题还是仅与损坏的Subversion修订版相关的问题?

The answer to this question suggests using the --log-window-size to prevent this issue from happening in the first place ... can I add the option and retry from the failed revision? is this issue then a git svn memory usage issue or a problem that is connected solely to a corrupted subversion revision?

是否存在 git svn选项,以使过程健壮以忽略错误而不是会因为这个错误而停止冗长的过程吗?

Is there a git svn option to robustify the process to ignore errors and not just stop the lengthy process due to this error?

更新:我到达

UPDATE: I arrived at this point following the Atlassian Stash Migrating to Git guide which indicates using git svn and their svn-migration-scripts.jar implementation

推荐答案

git-svn 不是一次性转换存储库或存储库零件的正确工具.如果要将Git用作现有SVN服务器的前端,这是一个很好的工具,但是对于一次性转换,您应该使用 git-svn ,而> svn2git ,它更适合此用例.

git-svn is not the right tool for one-time conversions of repositories or repository parts. It is a great tool if you want to use Git as frontend for an existing SVN server, but for one-time conversions you should not use git-svn, but svn2git which is much more suited for this use-case.

有一些名为 svn2git 的工具,可能最好的工具是 https://github.com/svn-all-fast-export/svn2git .我强烈建议使用该 svn2git 工具.这是我所知道的最好的,它在处理规则文件方面非常灵活.

There are pleny tools called svn2git, the probably best one is the KDE one from https://github.com/svn-all-fast-export/svn2git. I strongly recommend using that svn2git tool. It is the best I know available out there and it is very flexible in what you can do with its rules files.

如果您不是100%知道存储库的历史,请从 http://blog.hartwork.org/?p=763 是一个很好的工具,可以在将SVN信息库迁移到Git时对其进行调查.

If you are not 100% about the history of your repository, svneverever from http://blog.hartwork.org/?p=763 is a great tool to investigate the history of an SVN repository when migrating it to Git.

尽管git-svn较容易入门,但还有一些其他原因为什么除了灵活性之外,使用KDE svn2git 代替 git-svn 更为优越:

Even though git-svn is easier to start with, here are some further reasons why using the KDE svn2git instead of git-svn is superior, besides its flexibility:

  • 通过 svn2git (如果使用了正确的历史记录)可以更好,更清晰地重建历史记录,对于具有分支和合并等更复杂历史记录的情况尤其如此.
  • 标签是真实标签,不是Git中的分支
  • 带有 git-svn 的标签包含一个额外的空提交,这也使它们不属于分支,因此常规的 fetch 直到您给出-tags 到命令,默认情况下,也仅获取指向获取的分支的标记.带有正确的svn2git标签是它们所属的地方
  • 如果您在SVN中更改了布局,则可以轻松地使用 svn2git 进行配置,而使用 git-svn 最终会放弃历史记录
  • 使用 svn2git ,您还可以轻松地将一个SVN存储库拆分为多个Git存储库
  • 或将同一SVN根目录中的多个SVN存储库轻松组合到一个Git存储库中
  • 使用正确的 svn2git 进行的转换比使用 git-svn
  • 的转换快了数百万亿倍
  • the history is rebuilt much better and cleaner by svn2git (if the correct one is used), this is especially the case for more complex histories with branches and merges and so on
  • the tags are real tags and not branches in Git
  • with git-svn the tags contain an extra empty commit which also makes them not part of the branches, so a normal fetch will not get them until you give --tags to the command as by default only tags pointing to fetched branches are fetched also. With the proper svn2git tags are where they belong
  • if you changed layout in SVN you can easily configure this with svn2git, with git-svn you will loose history eventually
  • with svn2git you can also split one SVN repository into multiple Git repositories easily
  • or combine multiple SVN repositories in the same SVN root into one Git repository easily
  • the conversion is a gazillion times faster with the correct svn2git than with git-svn

git-svn 较差,而KDE svn2git 较优的原因有很多.:-)

There are many reasons why git-svn is worse and the KDE svn2git is superior. :-)

这篇关于Git svn clone:是否可以在错误后恢复XML格式错误:找不到元素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆