How to import a SVN repository, containing components renamed in history?
I have a SVN repository that is structured like the one in the following example:
component
branches
branch1
branch2
tags
branch1
tag1.1
tag1.2
branch2
tag2.1
tag_on_trunk
trunk
other_component
...
Imagine that each of the leaf folders above contains several eclipse projects. Also imagine that the component got renamed or moved several times during its history. The following issues occur in that case:
component
branches
branch1
branch2
tags
branch1
tag1.1
tag1.2
branch2
tag2.1
tag_on_trunk
trunk
other_component
...
Imagine that each of the leaf folders above contains several eclipse projects. Also imagine that the component got renamed or moved several times during its history. The following issues occur in that case:
-
Each name identifies a set of changes/revisions constituting a part of the history of the same component. In the importer it looks like there were different components with the different names that occurred in history, because in SVN the renaming got realized by some sort of cut and paste actions.
Now each of the copies has to be imported manually, as if it were a partial import of a tag. Thereby you have to know the chronological order of the copies (parts). Especially if you have branches that exist in multiple history parts, this results in a lot of work because you have to do all the import for every branch and every name of the component.
- When trying to import an additional part of the history the wizard asks to start at a latter revision but then it aborts the import with an error. Instead of this you have to import with the full history because the revision that terminated the previous import is needed. Perhaps this occurs because of the next strange observation:
- Once imported a part of a component corresponding to an old name, it gets a final change set that deletes all of the content. Then, when importing the next part, that part starts with a change set that recreates that data. Is there a possibility to tell the wizard that it semantically processes a renaming, to avoid this?
- Additionally all imported branches and manual imports of partial tags end up with a final deletion change set, if they were created for an old part of the component, so created before a renaming occurs.
Accepted answer
Steffen,
Unfortunately, the SVN importer doesn't have automated support for the types of copies you described. Here is a general set of steps that might work for you:
1) Import the changes before the copy into the target component
2) Discard the last change set containing the delete from the target component
3) Import the changes after the copy into the same component
a) Ensure the "reconcile" option is checked
b) When prompted to import a branch or to import starting at a particular revision, you should click No
Do those steps work for you?
Unfortunately, the SVN importer doesn't have automated support for the types of copies you described. Here is a general set of steps that might work for you:
1) Import the changes before the copy into the target component
2) Discard the last change set containing the delete from the target component
3) Import the changes after the copy into the same component
a) Ensure the "reconcile" option is checked
b) When prompted to import a branch or to import starting at a particular revision, you should click No
Do those steps work for you?
Comments
Steffen Weik
Dec 10 '13, 3:29 a.m.An update: issues 1 to 3 even occur without renaming the component.
Steffen Weik
Dec 10 '13, 5:56 a.m.I deleted those issues here and moved them to a separate question.
Steffen Weik
Dec 17 '13, 6:18 a.m.I could provide a small svndump but do not know how to attach a file here, any hints about that?