问题标签 [svn2git]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
2074 浏览

git - 带有部分标签和分支的 svn2git 迁移

我们有一个旧的 SVN 存储库,有 30 000 次修订。它包含一个带有 3 个分支的 projectX,其名称为 branchA、branchB、branchC

自修订版 20 000 以来存在 3 个分支。

我们的 repo 的设置如下:

分支包含 BranchA、branchB 和 branchC,并且标签包含很多标签。如您所见,没有后备箱。

现在我们要迁移所有数据(没有旧的分支、标签等),从一开始到修订版 20 000。从 20 000 我们要迁移到带有标签、分支和主干(branchA 分支)的末尾。

这就是我想用svn2git做的。

这会给出正确的结果还是在 svn2git 迁移期间没有更改主干(可能会混淆),我应该--notrunk在 git 中保留并决定什么是我的主人?欢迎其他意见。

0 投票
1 回答
541 浏览

git - 从特定开始日期开始的 svn2git 迁移

我正在使用 svn2git 将一个大型(7 年历史)项目从 SVN 转换为 Git,但我只想转换从 (01-01-2014) 开始的最近 3 年。

运行命令:

svn2git $SVN_URL --revision {"2014-01-01 00:00"} --verbose --no-minimize-url --trunk=trunk --branches=branches --tags=tags --authors ~/.svn2git/authors

输出:

command failed: git svn fetch -r {2014-01-01}:HEAD

有什么想法吗?我真的很感激任何帮助。

0 投票
1 回答
1547 浏览

git - 从 SVN 迁移到 GIT

我以这种方式从 SVN 迁移到 GIT

我可以更改迁移的提交,而不是

GIT 中的“提交到 SVN”是“SVN 中的修订号 - 提交到 SVN”

例如

541 - 初始化模块 ABC

0 投票
1 回答
1282 浏览

git - 使用 svn2git 进行 SVN 到 GIT 迁移时出错

当我尝试使用 svn2git 命令导入 svn 文件时出现以下错误

运行命令:git svn init --prefix=svn/ --no-metadata --trunk=trunk --tags=tags --branches=branches https://svnserver.com/abc/svn/projectname 运行命令:git svn获取无效的文件系统修订号:svn:E160006:无效的修订号'-1'在 /mingw64/share/perl5/site_perl/Git/SVN.pm 第 150 行。命令失败:git svn fetch

当我尝试使用 tortoise SVN 客户端结帐时,我遇到了同样的错误。然后我安装了与SVN服务器版本相同的客户端,问题得到解决。

但是当使用svn2git时,会出现同样的错误吗?是否存在版本兼容性问题?我正在使用 SVN 1.7.9 和 svn2git 2.3.2。

0 投票
1 回答
414 浏览

git - 将 svn 迁移到 git:合并文件上的校验和不匹配

我正在尝试手动将 SNV Repo 迁移到 Git 并遇到问题:

我初始化了我的(奇数)分支/主干/标签结构,git svn init...然后尝试在保留历史记录和日志的同时获取文件。但git svn fetch由于校验和不匹配错误,当它到达包含与 svn 分支之间的合并的修订时失败。

我已经尝试过 SO 上提出的不同解决方案,但其中大多数都与现有的 Git 存储库有关,我还没有(还没有)所以例如 git svn log 将无法工作,因为尚未获取 HEAD 修订版。没有任何效果...

我的猜测是,该文件是通过一次提交合并和修改的。有什么办法可以绕过校验和检查吗?还是另一种解决方案?

0 投票
1 回答
154 浏览

git-svn - 不能 svn2git 公共回购

我需要将客户从 SVN 迁移到 Git,所以我想首先在公共 SVN 存储库上尝试 svn2git。

我找到了几个公共仓库,例如https://svn.alfresco.com/repos/alfresco-open-mirror/alfrescohttp://svn.apache.org/repos/asf/spamassassin。没有问题svn co,但是当我尝试 svn2git 时,我得到以下问题:

D:\Documents\work\svn2git\apache>svn2git http://svn.apache.org/repos/asf/spamassassin Initialized empty Git repository in D:/Documents/work/svn2git/apache/.git/ Using higher level of URL: http://svn.apache.org/repos/asf/spamassassin => http://svn.apache.org/repos/asf W: Ignoring error from SVN, path probably does not exist: (160013): Filesystem has no item: REPORT request failed on '/repos/asf/!svn/bc/100': File not found: revision 100, path '/spamassassin' W: Do not be alarmed at the above message git-svn is just searching aggressively for old history. This may take a while on large repositories Checked through r100 Checked through r200 Checked through r300

它运行了整个晚上,并以:

Checked through r22000 Checked through r22100 W: Ignoring error from SVN, path probably does not exist: (175002): RA layer request failed: PROPFIND request failed on '/repos/asf': PROPFIND of '/repos/asf': could not connect to server (http://svn.apache.org) W: Do not be alarmed at the above message git-svn is just searching aggressively for old history. This may take a while on large repositories Checked through r477700 Path 'spamassassin' was probably deleted: RA layer request failed: PROPFIND request failed on '/repos/asf': PROPFIND of '/repos/asf': could not connect to server (http://svn.apache.org) Will attempt to follow revisions r477601 .. r477700 committed before the deletion r477601 .. r477679 OK Checked through r748600 Path 'spamassassin' was probably deleted: RA layer request failed: PROPFIND request failed on '/repos/asf': PROPFIND of '/repos/asf': could not connect to server (http://svn.apache.org) Will attempt to follow revisions r748501 .. r748600 committed before the deletion Checked through r748700 Checked through r748800 Checked through r748900 Checked through r749000 Checked through r749100 Checked through r749200 Checked through r749300 Checked through r749400 W: Ignoring error from SVN, path probably does not exist: (175002): RA layer request failed: PROPFIND request failed on '/repos/asf/!svn/vcc/default': PROPFIND of '/repos/asf/!svn/vcc/default': could not connect to server (http://svn.apache.org) W: Do not be alarmed at the above message git-svn is just searching aggressively for old history. This may take a while on large repositories Checked through r805700 Path 'spamassassin' was probably deleted: RA layer request failed: PROPFIND request failed on '/repos/asf/!svn/vcc/default': PROPFIND of '/repos/asf/!svn/vcc/default': could not connect to server (http://svn.apache.org) Will attempt to follow revisions r805601 .. r805700 committed before the deletion Checked through r805800 Checked through r805900 Checked through r806000 Checked through r806100 Checked through r806200 Checked through r806300 Checked through r806400 Checked through r806500 Checked through r806600 Checked through r806700 command failed: git checkout -f master

为什么会发生?是权限问题吗?

0 投票
1 回答
618 浏览

git - 为什么'git repack' 有时会说'Nothing new to pack'。和其他时候它重新打包所有东西(没有改变回购)?

我有一个拥有 17 年历史的大型 git 存储库。用 svn2git 转换后,我通常会执行 'git repack -a -d -f'。上面写着“没有什么新东西要打包”。然后,如果我将它推送到服务器(在我的情况下为 Bit Bucket),然后在服务器上找到存储库并重新打包,它会重新打包整个存储库。如果可能的话,我希望能够始终重新打包整个 repo。我无法弄清楚推送到服务器之间的变化是什么,这允许重新打包。请注意,客户端和服务器之间的存储库没有任何更改。

0 投票
1 回答
1207 浏览

git - 如何签出包含所有历史记录、标签和版本的整个 SVN 存储库

我有一个非常大的 SVN 存储库(近 6000 个修订版),我需要将其迁移到 Git。存储库托管在内部服务器上。我想将所有历史记录、标签和版本迁移到 Git,并以 Git 格式拥有分支等。

到目前为止,我已经在我的机器上安装了 TortoiseSVN,并且一直在尝试使用 git svn clone,但是,很多文件夹都太大了,我得到了块大小错误。同时,某些文件的文件路径中包含非法字符,因此在迁移过程中被跳过。

我还尝试使用 TortoiseSVN 将工作副本检出到我的本地计算机中,然后尝试通过设置本地svnserve(设置为 Windows 服务)来迁移它,但是,我永远无法使其能够访问文件使用svn://localhost/...我按照指南(https://subversion.open.collab.net/articles/svnserve-service.htm)将其设置为服务,我可以访问例如svn://localhost/dev,但是,当我通过 Tortoise 将文件签入此文件夹时,它看不到它们svn://localhost/dev/<sub-folder>显然我做错了什么,但是,我不确定是什么。

结构如下:

最后,我尝试使用 svn2git,但是在这种情况下我也遇到了错误。

进行迁移的最佳方法是什么和/或我做错了什么?任何帮助表示赞赏!

0 投票
3 回答
214 浏览

svn - 如何使用 svnever?

我有一个转储文件(Your_dumpfile.dmp),我正在尝试使用 svnever 检查存储库的格式以帮助编写 svn2git 的规则。

Svnever 听起来像是一个很棒的工具,但是,实际上并没有任何关于如何使用它的好的文档。

到目前为止,我已经按照https://github.com/hartwork/svneverever安装了它,并且我已经pysvn在这个过程中安装了它,这是一个依赖项。

目前,当我尝试运行时svneverever --no-progress <Your_dumpfile.dmp file path>,我得到以下信息:

我怎样才能让命令工作以及何时工作,从我的文件中的哪个位置运行它(例如,在转储文件所在的文件夹中......等)?

更新:我已经意识到在 svneverever 文件夹中,没有可执行文件。 https://i.imgur.com/zssv9Vz.png

其他文件夹中有一些 py 文件。我应该运行这些吗?

这是已经安装的:

https://i.imgur.com/jPxOjj4.png https://i.imgur.com/FVrGmlk.png https://i.imgur.com/q3cTV9W.png

0 投票
1 回答
2035 浏览

qt - 运行 qmake && make 时出错

我正在尝试在 Windows 上安装 svn2git。目前,我的 C:/ 目录中有 svn2git 克隆的 repo。构建需要Qt4(这是手册中指定的版本)但是,我似乎在正确安装Qt4时遇到了问题。

目前,当我尝试在 svn2git 文件夹中运行 qmake && make 时,我得到以下输出:

当我构建配置 Qt 时,我一直在这样做:

不完全确定我应该使用哪个平台安装它。

在配置输出结束时,我得到:

我在 C:/ 中安装了 MinGW,并mingw32-make.exe在 bin 中。 https://i.imgur.com/Q01zqiy.png

最后,我的系统环境变量中也有 Qt 和 MinGWhttps://i.imgur.com/dP2O0IM.png