scm command line to create workspace with a baseline ( not latest code)
Hi,
I am using scm 6.0.6.1 on my Unix machine. trying to create a new local workspace that download source code from a stream. it works fine when download latest code from a stream with following command :
scm create workspace --repository-uri $CCM_URI --username $(cat $RTC_USERNAME_FILE) --password $(cat $RTC_PASSWORD_FILE) --stream "${RTC_SCM_STREAM}" "${RTC_SCM_WORKSPACE}"
but when i tried to load a previous snapshot ( baseline) from the same stream,
scm create workspace --repository-uri $CCM_URI --username $(cat $RTC_USERNAME_FILE) --password $(cat $RTC_PASSWORD_FILE) --stream "${RTC_SCM_STREAM}" "${RTC_SCM_WORKSPACE}" --snapshot "20231213_snapshot"
output:
Problem running 'create workspace':
Can specify at most one of --empty, --stream, --snapshot or --historyRef. Try 'scm help create workspace' for more information.
Can specify at most one of --empty, --stream, --snapshot or --historyRef. Try 'scm help create workspace' for more information.
also tried UUID as the snaopshot arg, not working either.
please help.
Thanks
Accepted answer
I think the error message is quite telling. It looks as if you have the choice to either create the workspace based on a snapshot or based on the stream. You can not select both. If you later want to flow with a stream, you would have to add the flow target then.
Try something along these lines:
scm create workspace --repository-uri $CCM_URI --username $(cat $RTC_USERNAME_FILE) --password $(cat $RTC_PASSWORD_FILE) --snapshot "20231213_snapshot" "${RTC_SCM_WORKSPACE}"
Documentation here: https://www.ibm.com/docs/en/engineering-lifecycle-management-suite/workflow-management/7.0.3?topic=create-workspace does not mention the limitation, but it seems logical.