0

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?

Bhargav Rao
  • 50,140
  • 28
  • 121
  • 140
Steve
  • 8,066
  • 11
  • 70
  • 112

2 Answers2

1

I think this is because the dump file does not contain any transaction that would create the FOOBAR directory itself.

Try running svn mkdir file://$PWD/test/FOOBAR just before the svnadmin load test.

To give credit where it's due, I got this tip from http://dotslashstar.blogspot.com.au/2011/06/svn-hack-insert-missing-trunk-root.html

Tim Moore
  • 8,958
  • 2
  • 23
  • 34
  • +1: Although I found my own way using a text editor (nano), I can see how `svn mkdir` **before** `svnadmin load` might work. – Steve May 31 '12 at 04:29
0

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.

Steve
  • 8,066
  • 11
  • 70
  • 112