[英]git2svn unable to create symlink (File name too long)
I installed svn2git to quickly convert SVN repositories to GIT. 我安装了svn2git以快速将SVN存储库转换为GIT。 I tried the converting procedure on a different machine (Ubuntu 16.04) and a different SVN repository which worked without a problem.
我在不同的机器(Ubuntu 16.04)和不同的SVN存储库上尝试了转换过程。
Right now I am on Linux Mint Cinnamon with a different (but very simillar) SVN repository. 现在我在Linux Mint Cinnamon上使用了一个不同的(但非常类似的)SVN存储库。
git clone https://my.git.com/repository.git
cd repository
svn2git svn://my.svn.com/repository --authors ../authors_transform.txt
.
.
.
error: unable to create symlink asp/layer/man/rep/onewith_totalmax_victory.php (File name too long)
read-tree -m -u -v HEAD HEAD: command returned error: 128
I have read about the /home encryption possibility (as a file length limit), which is not my case. 我已经读过/ home加密可能性(作为文件长度限制),这不是我的情况。 Tried touching random string
尝试触摸随机字符串
touch Etiam_tortor_est0_placerat_sit_amet_dolor_in0_ultricies_malesuada_nisi-_Aenean_et_urna_enim-_Vivamus_porta0_velit_et_pulvinar_fermentum0_urna_lacus_tempor_sapien0_et_laoreet_tellus_elit_nec_ligula-_Nulla_iaculis0_libero_eget_rutrum_mattis0_nisl_velit_vive
Which is 256 characters and creates the file. 这是256个字符并创建文件。
How to deal with this? 怎么处理这个?
EDIT: The problem occurs on macOS Sierra aswell. 编辑:问题发生在macOS Sierra上。
Conversion broke the symlink try this: 转换打破了符号链接试试这个:
git clone --no-checkout https://my.git.com/repository.git
cd repository
git config core.symlinks false
git checkout <branch>
After all it seems it has been an issue with a specific file that was symlink and a file at the same time? 毕竟它似乎是一个特定文件的问题,同时是符号链接和文件?
Anyways manually fixing the file in SVN and then performing the conversion fixed the issue. 无论如何手动修复SVN中的文件然后执行转换修复了问题。
The svn2git
tool you used uses git-svn
under the hood, so it is not suitable for "quickly convert" an SVN repository. 您使用的
svn2git
工具在引擎盖下使用git-svn
,因此它不适合“快速转换”SVN存储库。
There are pleny tools called svn2git
, the probably best one is the KDE one from https://github.com/svn-all-fast-export/svn2git . 有所谓的pleny工具
svn2git
中,可能是最好的一个是KDE一个https://github.com/svn-all-fast-export/svn2git 。 I strongly recommend using that svn2git
tool. 我强烈建议使用该
svn2git
工具。 It is the best I know available out there and it is very flexible in what you can do with its rules files. 这是我所知道的最好的,它可以非常灵活地使用它的规则文件。
The svn2git
you used is based on git-svn
and git-svn
is not the right tool for one-time conversions of repositories or repository parts. 您使用的
svn2git
基于git-svn
而git-svn
不是用于一次性转换存储库或存储库部件的正确工具。 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. 这是一个伟大的工具,如果你想使用Git的作为前端为现有的SVN服务器,但对于一次性转换,你不应该使用
git-svn
,但svn2git
这是该用例更加适合。
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. 如果您不是100%关于存储库的历史记录,
svneverever
来自http://blog.hartwork.org/?p=763的 svneverever
是一个很好的工具,用于调查SVN存储库在将其迁移到Git时的历史记录。
Even though git-svn
(or the wrong svn2git
in your case) is easier to start with, here are some further reasons why using the KDE svn2git
instead of git-svn
is superior, besides its flexibility: 即使
git-svn
(或者你的情况下错误的svn2git
)更容易入手,这里有一些其他原因,为什么使用KDE svn2git
代替git-svn
是优越的,除了它的灵活性:
svn2git
(if the correct one is used), this is especially the case for more complex histories with branches and merges and so on svn2git
(如果使用正确的历史)重建历史更好更清晰,对于更复杂的分支和合并历史记录尤其如此等等 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. git-svn
标签包含一个额外的空提交,这也使它们不属于分支,因此正常的fetch
将不会得到它们,直到你给命令--tags
,因为默认情况下只提取指向提取的分支的标签。 With the proper svn2git tags are where they belong svn2git
, with git-svn
you will loose history eventually svn2git
轻松配置它,使用git-svn
最终会丢失历史记录 svn2git
you can also split one SVN repository into multiple Git repositories easily svn2git
您还可以轻松地将一个SVN存储库拆分为多个Git存储库 svn2git
than with git-svn
svn2git
比使用git-svn
快转换数倍 There are many reasons why git-svn
is worse and the KDE svn2git
is superior. git-svn
更糟糕且KDE svn2git
更优越的原因有很多。 :-) :-)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.