It's all about the answers!

Ask a question

scm command line to create workspace with a baseline ( not latest code)


wei yu (132) | asked Mar 07, 12:15 p.m.
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.

also tried UUID as the snaopshot arg, not working either.

please help.

Thanks



Accepted answer


permanent link
Ralph Schoon (63.3k33646) | answered Mar 07, 1:38 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Mar 07, 1:39 p.m.

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.

Ralph Schoon selected this answer as the correct answer

Comments
wei yu commented Mar 07, 1:48 p.m. | edited Mar 08, 2:56 a.m.

thanks, it is the root cause.


Ralph Schoon commented Mar 08, 2:57 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Please make yourself aware of comments and answers in the forum. Also, please accept a valid answer, if you got one. 

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.