svnassembla

Migrate svn from Assembla to Atlassian


I'm trying to migrate my subversion repo to Atlassian. Atlassian requires the imported repo dump to have a root directory with the same name as the project per project key. Let's say my project key in Atlassian is FOOBAR, then the repo dump should contain /FOOBAR for all revisions. It should also contain trunk, branches and tags subdirectories.

To rewrite the Assembla svn dump, I did this:

cat foobar-assembla.dump | svn-dump-reloc "/" "FOOBAR" > foobar-atlassian.dump

Then I tried testing it:

svnadmin create test
cat foobar-atlassian.dump | svnadmin load test

That produced an error message:

svnadmin: File not found: transaction '0-0', path 'FOOBAR/trunk'
 * adding path : FOOBAR/trunk ...

Any ideas?


Solution

  • The following worked for me.

    Using a text editor with all conversion options turned off:

    1. Replace all instances of Node-path: trunk with Node-path: FOOBAR/trunk.
    2. In the revision in which FOOBAR/trunk is created, manually add an entry immediately before the one that adds FOOBAR/trunk that creates FOOBAR, FOOBAR/branches and FOOBAR/tags.

    I understand this may not work in some cases, such as when Node-path: trunk occurs within a file itself. But it worked in this case and should work in most others.