How to mirror multiple branches from svn in Bitbucket using svn mirror


we have 3 branches in svn (trunk,6.1 and 6.1r) and we one repository(bb-test-repo) in Bitbucket and I wanted to mirror all above three branches from svn to bitbucket using svn mirror , can you please advise how to do this


here is the documentation article that describe that process:

That article describes both import and mirror, follow the section 2 that describes mirror.

Hi Ildar,

We were able to mirror the branch successfully in our POC. Now we have a requirement, please tell if this is possible. We have 10 or more projects in BB and many of them want to use the same mirrored branch from SVN, say svn-branch-1. What’s the best practice in such scenario? Let’s say 5 out of the 10 projects in BB want to contribute to the same svn-branch-1 mirror, can we have a single mirror in a new project in BB and let other projects also use it or do we need to create 5 mirrors for the same branch in all 5 projects, which will be quite resource heavy and redundant. Or you may have some other suggestion.

Please advise.

Hi Vishal,

frankly said, your setup is quite unusual, I’m afraid we don’t have a best practice to this scenario. For me, the ‘svn-branch-1’ directory looks more like a separate project, rather than a branch. If that’s the case, then it could be mirrored as a separate project and the changes may be fetched from the rest Git repositories and merged manually as it happens in SVN. This setup would not require to have 5 copies of the same branch, but a drawback is that it would require some configuration get changes from those 5 repositories to this repo.
Otherwise, the directory could indeed be added as a branch in other mirrors, yet such a setup can lead to conflicts when the branch is being updated in more than one repository at a time. The branch would appear 5 times in Git, indeed, and but on the other hand, the setup doesn’t require much configuration.