It's all about the answers!

Ask a question

How to import a SVN repository, containing components renamed in history?


Steffen Weik (346) | asked Dec 09 '13, 7:55 a.m.
edited Dec 10 '13, 5:54 a.m.
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:
    1. 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.
    2. 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:
    3. 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?
    4. 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.
Now I am worrying about the big amount of manual work and especially the wrongly created baselines at the end of the imports of the parts of history. Do you have any advise how to solve these problems?


Comments
Steffen Weik commented Dec 10 '13, 3:29 a.m.

An update: issues 1 to 3 even occur without renaming the component.


Steffen Weik commented Dec 10 '13, 5:56 a.m.

I deleted those issues here and moved them to a separate question.


Steffen Weik commented 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?

Accepted answer


permanent link
Michael Valenta (3.6k3) | answered Dec 17 '13, 8:16 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
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?
Steffen Weik selected this answer as the correct answer

Comments
Steffen Weik commented Dec 19 '13, 10:56 a.m.

Actually importing using these steps at least solves problems 3 and 4. Thanks for the advice!

Your answer


Register or to post your answer.