It's all about the answers!

Ask a question

How to merge external files with files in RTC component?


Pravin Patil (941998) | asked Feb 09 '15, 10:13 p.m.
Hi RTC SME's.

I need help in moving certain files and folders from local drive to RTC stream/Component:
The scenario is:
I have a folder on my local drive which contains files and nested-folders.
I want to merge it with RTC component which has some files and folders.
How can I do it?
While merging this content from local drive to RTC component, it should add any new files from the local drive folder, and should warn me for conflict if there are files with same names in the local drive folder and component repository files.

RTC version is 4.x

Please suggest on how can I achieve this?

2 answers



permanent link
Geoffrey Clemm (29.5k23035) | answered Feb 10 '15, 12:57 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
- Create a repository workspace on that stream
- Load that repository workspace into a sandbox on your local drive
- Use a file system copy that warns you about overwriting existing files (such as the standard Windows file system copy) to copy your local files into the desired location in the sandbox.


Comments
Pravin Patil commented Feb 10 '15, 1:08 a.m.

Thanks.

I don't to overwrite any file. I should be prompted to check contents of both files (files with same names), by using RTC compare editor and then make a call to resolve the content conflict by merge.
How can this be achieved?


Geoffrey Clemm commented Feb 10 '15, 1:43 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

You could:
- Replace the component baseline in your workspace with the Initial Baseline.
- Copy all your files into the now empty root directory of the component
- Checkin all of your files
- Accept the incoming changes from the stream.
But you will have to be careful how you do your merges.
You might want to try both techniques, and see which one is simpler (you can just keep the change-set from the technique you prefer, and discard the other).


Geoffrey Clemm commented Feb 10 '15, 1:43 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

You could:
- Replace the component baseline in your workspace with the Initial Baseline.
- Copy all your files into the now empty root directory of the component
- Checkin all of your files
- Accept the incoming changes from the stream.
But you will have to be careful how you do your merges.
You might want to try both techniques, and see which one is simpler (you can just keep the change-set from the technique you prefer, and discard the other).


Pravin Patil commented Feb 10 '15, 3:55 a.m.

Thanks!

I tried this with one file and it seems to be working. I just need to try with nested folders.
One query, the changes (merge) will overwrite the last baseline. So the earlier baselines will still have the differences (original content that it is supposed to have at the time of baseline), correct?


permanent link
VK L (8177129159) | answered Feb 10 '15, 1:51 a.m.
Hi,
Get the local-drive details of RTC Workspace, where the stream-contents are loaded. Update it once. Then, you can directly copy the new contents from the local drive to the RTC-Workspace mapped location.
This will be a file-system level copy and it will prompt you if there are files with same names. You can choose to overwrite. Once its copied, the new contents will be available in Eclipse -> "Pending changes" view.
During "Check-in" operation, RTC will warn if there are conflicts in file contents and at this point, you can compare the contents using editor.

Thanks.

Comments
Pravin Patil commented Feb 10 '15, 2:54 a.m.

I overwrote a file on my local system. It showed up in my pending changes, but when I "checked in and deliver" it didn't prompt me for conflict. It just accepted the change that I pasted in the local system file (overwritten file).

Am I doing anything incorrect here?


VK L commented Feb 10 '15, 3:17 a.m.

If there is a conflict, where RTC is unable to merge the 2 files, it will prompt.
You can check the differences by using "compare with previous version" option on the file->right-click in eclipse.

Thanks.


Pravin Patil commented Feb 10 '15, 3:50 a.m.

I was hoping that it will not even deliver the change, it should have shown conflict in the very first attempt of "Checkin and Deliver". It should have shown conflict because, the file existing in component has some content which is different then the content of file I pasted on local system workspace (the file names are same).

Does it not work that way?


Pravin Patil commented Feb 10 '15, 3:52 a.m.

 I was hoping that it will not even deliver the change. It should have shown conflict in the very first attempt of "Checkin and Deliver". It should have shown conflict because, the file existing in component has some content which is different then the content of file I overwrote on locally loaded workspace (the file names are same).

Does it not work that way?


VK L commented Feb 10 '15, 4:27 a.m.

All versions that we check-in will have some different contents - i dont think you will get conflicts for every check-in, only in cases, where RTC is not able to update the existing, it will show conflicts, where user can resolve it.

Your answer


Register or to post your answer.