Migrating multiprojects with their tags and branches which are located as directories under one trunk in SVN

Hi,
I need to migrate a large scale SVN project repository having a structure like this:
Project A
|
|__trunk
| |__subprojectA_1
| |__sub1_subprojectA1
| |__sub2_subprojectA1
|
|__tags
| |__tagof_sub1_subprojectA1
| |__tagof_sub2_subprojectA1
|
|__branches
|__branchof_sub1_subprojectA1
|__branchof_sub2_subprojectA2
We need to migrate each subprojectA folder as a repository under a GIT project (for ex. ProjectA ) with their tags and branches and also with history. How should branch mapping be?
We tried automatic configuration option by defining Project as “svn.mycompany.com/ProjectA” and select trunk as one of subprojectA s ,
subprojectA1 imported with history but no tags or branches were imported.
I would really appreciate any solutions,though I have been waiting an ongoing git svn clone of that I am not sure that it will be converted as it is supposed to be.

Hi Nilay,

automatic mapping configuration creation would not work for this case, indeed, mapping should be created manually. This is one of the common cases, it’s described in this article:

https://subgit.com/documentation/branches-mapping.html#multiple_projects

Shortly, the paths to appropriate trunk and branches directories should be added to the configuration manually. For the structure you mentioned, it may look like this:

url = svn.mycompany.com/ProjectA

trunk = trunk/subprojectA_1:refs/heads/master
branches = branches/branch1_of_sub1_subprojectA1:refs/heads/branch1
branches = branches/branch2_of_sub1_subprojectA1:refs/heads/branch2 
…
branches = branches/branchN_of_sub1_subprojectA1:refs/heads/branchN
tags = tags/tag1_of_sub1_subprojectA1:refs/tags/tag1
tags = tags/tag2_of_sub1_subprojectA1:refs/tags/tag2
…
tags = tags/tagN_of_sub1_subprojectA1:refs/tags/tagN

Note, this in this example every branch and tag that should be imported to Git are being referred by its exact name, on both sides on the mapping. It’s not mandatory, however – for example, if there are some commonalities in their names, then they can be mapped using wildcard mapping, like:

branches = branches/*_subprojectA1:refs/heads/*

Particular mapping pattern depends on the actuals names of branches and tags, however. And the exact names mapping approach would work in any case.

Hi Ildar,
Thanks a lot! your answer helped after a few tries (I first overlooked your warning about giving exact same names to both git and svn repositories), successfully imported the subproject as a respository with tags-branches and history.
I have one more question about pricing. Does using only import feature of Bitbucket SVN mirror plugin will require license at the end of trial period?

Hi Nilay,

yes, SVN Mirror requires a valid license for all functionality, including import.

Hi Ildar,
Thanks for your quick response, my real question is: in https://subgit.com/pricing page one time imports seems possible in"more free options", While using Bitbucket SVN plugin should we pay price per bitbucketusers or not for only using import feature. We don’t need to use mirroring.

Hi Nilay,

yes, that’s correct, import functionality with SubGit command-line tool is available for free and does not require license. However, it’s different with SVN Mirror add-on as it’s being sold through Atlassian Marketplace and policies are being defined by Atlassian.

Ok ,got it. Thanks for your help,really quick and informative :)

My pleasure!

1 Like