Welcome to the Jazz Community Forum
scm load without override

Hi,
We have a folder "mydir" with some content on the filesystem where we want to load a RTC component "mycomponent" with scm command line.
We would like the content of "mycomponent" to simply override the one in "mydir", that is :
- if there is a file or directory in "mydir" but not in "mycomponent" that file or directory should stay in "mydir" after loading
- if there is a file or directory in "mycomponent" but not in "mydir" that file or directory should be added to "mydir" on loading
- if there is a file in both "mycomponent" and in "mydir" that file in "mycomponent" should override the one in "mydir"
Currently I see that if we have name collisions, we cannot load the component.
We could use --force option but in that case the whole content of "mydir" is simply replaced by the content of "mycomponent".
How could we get what we want to achieve?
Accepted answer

I don't think there is an option in the load command to do exactly what you want. However, it can be easily achieved using a script/batch program -
1. Rename "mydir" to "mydir.temp".
2. Load "mycomponent" to "mydir".
3. Copy "mydir" to "mydir.temp" and override existing files.
4. Remove "mydir".
5. Rename "mydir.temp" to "mydir".
6. Run scm status command to catch extra changes.
1. Rename "mydir" to "mydir.temp".
2. Load "mycomponent" to "mydir".
3. Copy "mydir" to "mydir.temp" and override existing files.
4. Remove "mydir".
5. Rename "mydir.temp" to "mydir".
6. Run scm status command to catch extra changes.