Can scm workspace replace-components be used to replace baseline of repository workspace from baseline of component?
I am trying to use "scm workspace replace-components" command to replace baseline of repository workspace from baseline of component.
However it seems as it only support replace from workspace, stream or snapshot
replace-type | Type of the item to replace. One of: "workspace", "stream", or "snapshot" |
Is there any ways to use scm command to replace baseline of repository workspace from baseline of component?
Thank you in advance!
Accepted answer
Yes, you can, but the syntax is rather obscure. You need to use the "-b" parameter to specify the baseline that you want to use. But then you still have to specify a <replaceType> (I have no idea why that is required ... perhaps someone from the scm team could explain). What I do is just specify "workspace" as the replace type, and then I just name the workspace that I am doing the replace in ... that seems to make the command happy. So for example, if I want to replace the baseline of component "comp" in workspace "ws" with baseline "bl", you can say:
scm workspace replace-components -b bl -P <my-login> -u <my-password> -r <my-repo> ws workspace ws comp
Note: you'll always want to use "scm help" to look up the syntax of a command, since for some reason, the on-line documentation on the scm syntax frequently has bugs.
scm workspace replace-components -b bl -P <my-login> -u <my-password> -r <my-repo> ws workspace ws comp
Note: you'll always want to use "scm help" to look up the syntax of a command, since for some reason, the on-line documentation on the scm syntax frequently has bugs.