如何 运行 为 t运行k 和一个特定分支导入 subgit
How to run a subgit import for trunk and one specific branch
嗨,我有一个关于 SubGit 版本 3.2.1 ('Bobique') build #3593 的问题。
要导入的 svn 存储库没有标准布局。
我找不到为一个主干和一个与主干处于同一级别的特定分支配置 'subgit import' 的文档。分支不在分支文件夹中。
换句话说..
在 svn 中我们得到了一个应该映射到 master 的主干。
在 svn 中我们有分支 x,它应该被映射到 develop。
希望我已经说清楚了。有谁能够帮助我?
问候
首先你可以运行
$ subgit configure --svn-url PROJECT_ROOT repo.git
然后根据以下条件编辑repo.git/subgit/config。如果你想要连续同步,你是否希望其他分支被翻译(例如当有人推送 refs/heads/new 分支时,它是否应该被翻译成 SVN)?如果是,你应该有以下配置:
trunk = trunk:refs/heads/master
branches = x:refs/heads/develop
branches = *:refs/heads/*
#it's up to you whether you want to have tags/shelves or not
#shelves = shelves/*:refs/shelves/*
#tags = tags/*:refs/tags/*
如果没有,您可以只指定某个分支:
trunk = trunk:refs/heads/master
branches = x:refs/heads/develop
#it's up to you whether you want to have tags/shelves or not
#shelves = shelves/*:refs/shelves/*
#tags = tags/*:refs/tags/*
在第二种情况下,当你按下 refs/heads/branch 时,SubGit 会忽略它。
如果只需要一次翻译,两者配置相同
最后,运行
$ subgit install repo.git
如果不需要持续同步,那么可以运行
$ subgit uninstall repo.git
嗨,我有一个关于 SubGit 版本 3.2.1 ('Bobique') build #3593 的问题。
要导入的 svn 存储库没有标准布局。
我找不到为一个主干和一个与主干处于同一级别的特定分支配置 'subgit import' 的文档。分支不在分支文件夹中。
换句话说..
在 svn 中我们得到了一个应该映射到 master 的主干。 在 svn 中我们有分支 x,它应该被映射到 develop。
希望我已经说清楚了。有谁能够帮助我?
问候
首先你可以运行
$ subgit configure --svn-url PROJECT_ROOT repo.git
然后根据以下条件编辑repo.git/subgit/config。如果你想要连续同步,你是否希望其他分支被翻译(例如当有人推送 refs/heads/new 分支时,它是否应该被翻译成 SVN)?如果是,你应该有以下配置:
trunk = trunk:refs/heads/master
branches = x:refs/heads/develop
branches = *:refs/heads/*
#it's up to you whether you want to have tags/shelves or not
#shelves = shelves/*:refs/shelves/*
#tags = tags/*:refs/tags/*
如果没有,您可以只指定某个分支:
trunk = trunk:refs/heads/master
branches = x:refs/heads/develop
#it's up to you whether you want to have tags/shelves or not
#shelves = shelves/*:refs/shelves/*
#tags = tags/*:refs/tags/*
在第二种情况下,当你按下 refs/heads/branch 时,SubGit 会忽略它。 如果只需要一次翻译,两者配置相同
最后,运行
$ subgit install repo.git
如果不需要持续同步,那么可以运行
$ subgit uninstall repo.git