It's all about the answers!

Ask a question

scm load without override


Oscar Picasso (311420) | asked Sep 05 '13, 4:21 p.m.
retagged Sep 05 '13, 4:50 p.m. by Te-Hsin Shih (2854)
 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


permanent link
Te-Hsin Shih (2854) | answered Sep 05 '13, 4:59 p.m.
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.
Oscar Picasso selected this answer as the correct answer

Your answer


Register or to post your answer.