1

We are using Stash (3.8.0) with the SVN Mirror for Atlassian Stash (2.0.15) plugin, both licensed for 50+ seats. We are trying to mirror SVN to an empty repository in Stash, however. The following keeps us from going.

Our SVN link is svn://svn.hostname.com/. The code lies within the /, not in a branch, trunk or tag. We do not use any of those. When Stash is done importing, we get no error in Stash.

The status page said the following but the repository stays empty.

Subversion Mirror

Does anybody know if this is a possible bug or just a misconfiguration?

1 Answers1

1

It's a bug in 2.0.15 and misconfiguration. By default SVN mirror plugin assumes you have standard trunk/branches/tags structure, and if there're no such directories, no commits are translated. But if you have different repository structure, you can specify it as well, and since version 2.0.16 (when it is released; 2.0.15 doesn't support that) you can specify project root as the only "branch" of the project.

So the steps are:

  1. Install SVN mirror plugin of version >= 2.0.16 or use this link to 2.0.16-beta3 version (if it not released yet):

http://old.subgit.com/download/stash/stash-svn-importer-2.0.16-beta3.jar

(Choose Administration | Manage add-ons | Upload add-on | From this URL)

  1. Create a repository, choose "Subversion Mirror".
  2. Fill SVN URL, leave Trunk/Branches/Tags/Shelves options as is, you will overwrite them later. Specify other options if you need. Press "Continue".
  3. Choose Advanced Configuration | Apply changes

Edit SVN Mirror plugin for Stash configuration

Edit the config to remove all trunk/branches/tags/shelves options and to add only

trunk = :refs/heads/master

You can find documentation on the options in SubGit book and in comments in this file starting from # character.

:refs/heads/master rule means that SVN path before : character (which is an empty string, that corresponds to the project root) is mapped to Git reference refs/heads/master.

  1. Check authors in "Authors mapping" tab and press "Continue".

That's all, now refs/heads/master Git reference has the history of your project root in Subversion repository.

Dmitry Pavlenko
  • 8,530
  • 3
  • 30
  • 38
  • This is a excellent workaround for this problem. Thank you for your solution and your good guide. Too bad I only can give +1 once. –  Apr 02 '15 at 22:54