运行什么依赖项“git svn”需要安装以便正确运行? [英] What dependencies does running "git svn" need to have installed in order to run correctly?

查看:304
本文介绍了运行什么依赖项“git svn”需要安装以便正确运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在努力获得Subversion到Git的迁移,以便在企业IT管理的Red Hat 6.4 Linux工作站上工作。我们的IT组织通过将它们安装在我们本地工作站上的/ apps目录下,提供了他们认为需要的大多数OTS软件包的多个版本。 我的箱子上没有root或sudo,或者这可能会更容易一些。在一些博客文章(例如这一篇),并试图设置我的PATH和LD_LIBRARY_PATH correclty,我已经到了成功的地步 git svn init< my / svn / path> ,但运行 git svn fetch 会产生如下错误:

 无法为模块SVN :: _ Core加载'/apps/subversion_1.9.4/lib/site_perl/5.14.2/x86_64-linux-thread-multi-ld//auto/SVN/_Core/_Core.so':
/apps/subversion_1.9.4/lib/site_perl/5.14.2/x86_64-linux-thread-multi-ld//auto/SVN/_Core/_Core.so:
未定义符号:svn_swig_pl_thunk_config_enumerator位于/ usr /lib64/perl5/DynaLoader.pm line 200.



位于/apps/subversion_1.9.4/lib/ site_perl / 5.14.2 / x86_64-linux-thread-multi-ld // SVN / Base.pm第59行
BEGIN失败 - 编译在/apps/subversion_1.9.4/lib/site_perl/5.14.2/中止x86_64的Linux的线程多LD // SVN /有限公司



我追踪了包含此符号的库(看起来像这可能是编译路径的问题)为 libsvn_swig_perl-1.so 。我将bash中的LD_PRELOAD env变量设置为该库的路径,但是然后运行 git svn fetch 给了我一个新错误:

  /apps/git_2.9.3/bin/git:符号查找错误:
/apps/subversion_1.9.4/lib/libsvn_swig_perl-1.so:undefined符号:PL_thr_key

我还没有能够成功找到来自PL_thr_key的包和库。任何提示,我可以得到一个完整的依赖关系列表(或者至少在PL_thr_key被定义的地方),希望我的svn-to-git迁移完成?

解决方案

对于一次性迁移 git-svn 不是转换存储库或部分存储库的正确工具库。如果您想将Git用作现有SVN服务器的前端,那么它是一个很好的工具,但是对于一次性转换,您应该使用 git-svn ,但 svn2git 更适合这种用例。



code> svn2git ,最好的一个是来自 https://github.com/svn-all-fast-export/svn2git 。我强烈建议使用 svn2git 工具。这是我所知道的最好的方法,它可以很灵活地处理你的规则文件。



你可以很容易地配置 svn2git 的规则文件来生成您当前SVN布局所需的结果,包括可能存在的任何复杂历史记录,包括从一个SVN回购中生成几个Git回收或将不同的SVN回购组合到一个如果你愿意,可以在一次运行中干净地回购Git回购,并且排除任何你不想迁移的路径或分支或标签,但如果有人丢弃了宝贵的代码历史,我会一直哭。



如果您不是100%关于您的存储库的历史记录, svneverever 来自 http://blog.hartwork.org/?p=763 是一个很好的工具,用于在将SVN存储库迁移到Git时调查SVN存储库的历史。 / p>




即使 git-svn 或nirvdrum svn2git 更容易入手,下面是为什么使用KDE svn2git 而不是 git -svn 除了它的灵活性之外更加优越:


  • 历史被<$ c重建得更好更清晰$ c> svn2git (如果使用了正确的),对于更复杂的分支和合并历史记录尤其如此,

  • 标签是您可以使用 git-svn
  • 生成注释标签而不是轻量级标签 code>标签包含一个额外的空提交,这也使它们不是分支的一部分,所以一个正常的 fetch 不会得到它们,直到你给 - tags ,默认情况下,只有指向提取分支的标签也被提取。如果您在SVN中更改了布局,您可以使用 svn2git 来轻松配置它,而<$ li
  • c $ c> git-svn 您最终将失去历史记录

  • svn2git 很容易将SVN信息库转换为多个Git存储库

  • 或者将同一SVN根目录下的多个SVN信息库轻松组合成一个Git存储库

  • 转换是巨大的数倍使用正确的 svn2git 比使用 git-svn

$ b更快
$ b

你看,为什么 git-svn 更糟,而KDE svn2git 是优越的。 : - )

I've been struggling with getting a Subversion to Git migration to work on a corporate-IT managed Red Hat 6.4 Linux workstation. Our IT organization provides several versions of most of the OTS packages they think we'll need by mounting them under an "/apps" directory on our local workstations. I do not have root or sudo on my box, or this would probably be easier. Following some blog posts (such as this one), and trying to set up my PATH and LD_LIBRARY_PATH correclty, I've gotten to the point where I've done a successful git svn init <my/svn/path>, but running the git svn fetch yields errors such as:

Can't load '/apps/subversion_1.9.4/lib/site_perl/5.14.2/x86_64-linux-thread-multi-ld//auto/SVN/_Core/_Core.so' for module SVN::_Core:
/apps/subversion_1.9.4/lib/site_perl/5.14.2/x86_64-linux-thread-multi-ld//auto/SVN/_Core/_Core.so:
undefined symbol: svn_swig_pl_thunk_config_enumerator at /usr/lib64/perl5/DynaLoader.pm line 200.

at /apps/subversion_1.9.4/lib/site_perl/5.14.2/x86_64-linux-thread-multi-ld//SVN/Base.pm line 59 BEGIN failed--compilation aborted at /apps/subversion_1.9.4/lib/site_perl/5.14.2/x86_64-linux-thread-multi-ld//SVN/Core.pm line 5.

I've tracked down the library that contains this symbol (seems like this could be an issue with compilation paths) to be libsvn_swig_perl-1.so. I set the LD_PRELOAD env variable in bash to the path to that library, but then running the git svn fetch gives me a new error:

/apps/git_2.9.3/bin/git: symbol lookup error: 
/apps/subversion_1.9.4/lib/libsvn_swig_perl-1.so: undefined symbol: PL_thr_key

I have not yet been able to successfully locate what package and library "PL_thr_key" comes from. Any hints on where I can get a full list of dependencies (or at least where PL_thr_key is defined) to hopefully get my svn-to-git migration finished?

解决方案

For a one-time migration git-svn is not the right tool for conversions of repositories or parts of a repository. 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.

There are plenty 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.

You will be easily able to configure svn2gits rule file to produce the result you want from your current SVN layout, including any complex histories that might exist and including producing several Git repos out of one SVN repo or combining different SVN repos into one Git repo cleanly in one run if you like and also excluding any paths or branches or tags you don't to have migrated, though I'm always crying a little if someone discards code history which is precious.

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.


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

  • 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
  • you can generate annotated tags instead of lightweight tags
  • 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

You see, there are many reasons why git-svn is worse and the KDE svn2git is superior. :-)

这篇关于运行什么依赖项“git svn”需要安装以便正确运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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