Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Svnadmin load from dumpfile causes "file not found error". Help?

Tags:

svn

dump

svnadmin

Given:

Repository_1 - source

Repository_2 - destination

I created a dump file of Repository_1/Folder1 using combination of svnadmin and svndumpfilter

When loading from the dump file from Repository_1/Folder1 into Repository_2/Trunk everything is fine BUT

When loading from Repository_1/Folder1/Sub-folder(created another dump for this) into Repository_2/trunk i get the following error:

svnadmin: File not found: transaction '267-89', path 'trunk/Folder1/Sub-folder'

Can anyone explain?

like image 549
Chicago Avatar asked Mar 01 '10 22:03

Chicago


3 Answers

Turns out that structure(empty folders) in destination needs to pre-created. So, If you want to do this:

When loading from Repository_1/Folder1/Sub-folder(created another dump for this) into Repository_2/trunk

you need to created this structure in svn

Repository_2/trunk/Folder1

note: you only need to create parents, not the folder itself, so DO NOT CREATE Repository_2/trunk/Folder1/Sub-folder

like image 84
Chicago Avatar answered Nov 20 '22 19:11

Chicago


you'll get this error if someone copied something from trunk/Folder1 to trunk/Folder1/Sub-folder. since you have only included trunk/Folder1/Sub-folder in your dump, it cannot find the required file(s) from trunk/Folder1 anymore and stops with this error.

to solve this you'll have to make sure to include everything in the dump that has been the source of a copy.

like image 32
stmax Avatar answered Nov 20 '22 20:11

stmax


As noted in this thread, svnrdump works differently from svndump.

svndump + svndumpfilter:

  • Dumps the entire repository history, then filters for the things you want. This takes a long time on large repositories, even if you're just grabbing a tiny subtree.
  • Produces a dumpfile that is probably broken in a number of ways, like creating files in directories that don't exist or copying files from paths that don't exist.

svnrdump:

  • Produces a self-consistent dumpfile.
  • Requires a subpath if you want to do the equivalent of svndumpfilter include. For example, svnrdump https://server.example.com/svn/repo/branches/1.4 would grab all the revisions affecting /branches/1.4.
  • May require an additional | svndumpfilter include / --drop-all-empty-revs --renumber-revs.

Bottom line: svnrdump will probably work better.

like image 2
Chris Jones Avatar answered Nov 20 '22 19:11

Chris Jones