迁移SVN工程到GITLAB

[复制链接]
发表于 2025-11-16 11:43:24 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

×
1.迁移整个版本库,生存提交记载:
git svn clone SVN堆栈所在 --stdlayout --no-metadata --authors-file userinfo.txt project(拉取的数据存储目次)
此中:
`--stdlayout` 参数体现你的项目在 SVN 中是常见的 “`trunk/branches/tags`” 目次布局,
假如不是,那你须要使用 `--tags`, `--branches`, `--trunk` 参数(通过 `git svn help` 相识)
--no-metadata:加上该参数后,天生的提交记载阐明中 不会天生每一个提交记载对应的svn上的Rev版本信息。
举例:
git svn clone https://192.168.3.6/svn/xxxx --stdlayout --no-metadata --authors-file svn_user_convert.txt

2.迁移代码库中的某个分支或文件夹目次:
git svn clone SVN堆栈所在 -s --no-metadata -A userinfo.txt project(拉取的数据存储目次)
如:直接迁移SVN工程下的某个分支:
git svn clone https://192.168.3.6/svn/xxx-svc --no-metadata --authors-file svn_user_convert.txt

------

为了得到 SVN 使用的作者名字列表,可使用GIT BASH 在SVN 项目下运行这个:
svn log --xml --quiet | grep author | sort -u | \
perl -pe 's/.*>(.*?)<.*/$1 = /'
大概手动编写作者名称对应表,txt文件。格式为:
apple = apple <[email protected]>
VisualSVN Server = VisualSVN Server <xxx@mymailcom>
回复

使用道具 举报

登录后关闭弹窗

登录参与点评抽奖  加入IT实名职场社区
去登录
快速回复 返回顶部 返回列表