Migrate SVN without importing history
Hello everybody,
I would like to import the trunk and 2 branches from a svn repository without importing all the revisions. The previous revisions were containing confidential data we have externalized lately but you can still view it in the history. So that the import via SVN dump often recommended in the forum is not a viable option in this case.
So if you have a procedure and could help, it would be really appreciated.
Let me explained what I have already tested:
Test1:
1 - Create 2 workspace (WS_Trunk / WS_Branche) which contain the same empty component
2 - Load a working copy of the trunk. Disconnect the source code from svn repository and check-in it in WS_Trunk
3 - Unload WS_Trunk from my eclipse sandbox
4 - Load a working copy of the branch. Disconnect the source code from svn repository and check-in it in WS_Branch
5 - Unload WS_Branch from my eclipse sandbox
6 - After I try to receive the changes from WS_Branch to WS_Trunk => horror each single file are in conflict
7 - I try to do an auto-merge without any success
Test 2:
1 - Follow the procedure to import from an SVN dump => trunk imported in stream Trunk_STR
2 - CReate a snapshot of Trunk_STR
3 - Create a stream from the snapshot by hoping the history would be hidden => no success
|
2 answers
Geoffrey Clemm (30.1k●3●30●35)
| answered Apr 26 '13, 10:32 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
The secret is after importing the trunk, delete the tree and copy in the branch version without Eclipse/RTC noticing it. In addition, to get a good history, you don't want to just import the Trunk and Branch1 and Branch2, but rather first import (this is assuming Branch1 and Branch2 both branched off of the Trunk):
- the tag on the Trunk that Branch1 branched from (let's call that Branch1-Base) - the tag on the Trunk that Branch2 branched from (let's call that Branch2-Base) Then you can import the tip of the Trunk, the tip of Branch1, and the tip of Branch2. The sequence will be: - import Branch1-Base (that you know how to do :-) into the RTC-Trunk stream - import Branch2-Base ON TOP OF Branch1-Base into the RTC-Trunk stream (I will describe import "on top of" below) - import Trunk tip ON TOP OF Branch2-Base into the RTC-Trunk stream - import Branch1 tip ON TOP OF Branch1-Base into the RTC-Branch1 stream - import Branch2 tip ON TOP OF Branch2-Base into the RTC-Branch2 stream Now, how to import a new configuration "tree2" ON TOP OF existing configuration "tree1" :
1 - Use RTC-Eclipse to load an RTC sandbox with tree1.
2 - Shut down your Eclipse process (to make sure it doesn't notice the game you will play below)
6 - checkin everything and deliver to the RTC stream which you want to contain tree2.
3 - Use file system command to delete tree1 from the sandbox 4 - Use file system command to copy tree2 into the location where tree1 was in the sandbox. 5 - Start up RTC-Eclipse, and refresh the sandbox so it sees the new directories/files you've copied in step 4 Note: Pay close attention to the instructions of what you are loading on top of what ... that matters (:-). Also note that I'm assuming that the base of both branches was on the trunk. The same process can be applied if the base of Branch2 was on Branch1, but what you import on top of what changes ... if you have any trouble figuring out what you should import on top of what in that case, just let me know. |
Ralph Schoon (63.7k●3●36●48)
| answered Apr 26 '13, 4:17 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Apr 26 '13, 4:20 a.m.
Hi Benoit,
if the branches and the trunk are related (have a common root) it would make sense to import them, so that you can have them as different baselines. You want to import them, to be able to later merge data back and forth. I have not tried if that is possible if the elements have no common ancestor. But we have used a technique that allows to have several baselines imported starting with a common ancestor for a workshop. What you can do is as follows. Find the common ancestor. Create a workspace based on a stream. Import the data of the common ancestor (e.g. load from SVN disconnect from svn). Share the data to the desired component(s). Create a baseline (or Snapshot) and deliver. You have now a common baseline. To share a branch, delete the projects. Import the data of the branch, head,... (e.g. load from SVN disconnect from svn). Share the projects again to the desired components. The pending changes will show the differences. Create a baseline (or Snapshot) (for that branch) and deliver. You can do this for the trunk and the other branch as well. What you should consider is, create a new stream from the appropriate baseline before sharing the changed content. If you do this in the right order, you should have streams with a common ancestor and different baselines representing the branches, trunk etc in a way like you imported with history, but not having the single steps. You should have no issues in merging back in, comparing etc. |
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.
Comments
Possibly the root cause of the conflicts is that there are different time stamps. Anyway I have no idea how to fix it.