Map SVN revisions to Bitbucket commits

Hi Team,

The migration of SVN to Bitbucket has already been done using SubGIT plugin on Bitbucket.

I have tens of thousands of SVN revisions that I want to map with the Bitbucket Commits.

Can you please help?


Hi Santosh,

thank you for reaching out to us on that matter!

SVN Mirror add-on writes some information to notes during the import, so that it’s possible to show this information in git log output. In a working copy it can be done by adding the following configuration to the .git.confg file:

Fetch SubGit mapping information:
[remote "origin"]
fetch = +refs/svn/map:refs/notes/commits

in a bare repository (right on Bitbucket server) it can be done with the following command:

git update-ref refs/notes/commits refs/svn/map

Hope this will help.

Hi Ildar,

I updated the config file with the following.

fetch = +refs/svn/map:refs/notes/commits

I then ran this in the git repository: git update-ref refs/notes/commits refs/svn/map

It throws the following :

fatal: refs/svn/map: not a valid SHA1

Am I missing anything here?

Hello Santosh,

those are separate approaches for a local working copy (the first one) and for the server bare repository (the second). To user the former clone a previously imported Bitbucket repository on your computer, the add those lines to the Git config file in this newly cloned repository, then run git pull command.
For the latter approach the command should be invoked right on the Bitbucket server, in the imported repository directory.