It's all about the answers!

Ask a question

Subversion Import fails


Martin Pauly (632) | asked May 24 '11, 2:30 p.m.
Hi,
we're currently trying to migrate our existing svn repository into RTC and found the following problem:

If revision 1 has a file 01.txt that in revision 2 is split (copied) into a 2nd file 02.txt (SVN copyfrom feature) and also in revision 2 the original file 01.txt is modified then RTC will fail with such revisions with the following fault:

An internal error occured during: "Import from SVN:"
Revision 2: Missing previous subtree for revision 01 of folder/01.txt


I finally have been able to generate a valid svn dump file with just 3 very small revisions that replicates this problem - is anyone able to confirm or even better provide a workaround for it?

Thanks in advance
Martin

2 answers



permanent link
Michael Valenta (3.7k3) | answered May 25 '11, 9:11 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
A work item was opened for this:

https://jazz.net/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/167081

permanent link
Alex Mirski-Fitton (6) | answered Jul 13 '11, 9:11 a.m.
A work item was opened for this:

https://jazz.net/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/167081


The work item is marked as resolved with a fix, but for anyone who isn't able to grab the latest patched version, here's something that worked for me (I've updated the work item with the workaround too).


Edit the svn dump and swap the order of operations. It would appear that the import trips over the "edit then copy" but is quite happy with "copy then edit"

Somewhat cut down example of my fix:

Original:

Revision-number: 37
...
...
Node-path: <file1>
Node-kind: file
Node-action: change
...
...

Node-path: <file2>
Node-kind: file
Node-action: add
Node-copyfrom-rev: 36
Node-copyfrom-path: <file1>
...
...
Revision-number: 38


Replacement (swapped order of operations):

Revision-number: 37
...
...
Node-path: <file2>
Node-kind: file
Node-action: add
Node-copyfrom-rev: 36
Node-copyfrom-path: <file1>
...
...
Node-path: <file1>
Node-kind: file
Node-action: change
...
...
Revision-number: 38

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.