Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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.

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

please help.

Thanks



0 votes


Accepted answer

Permanent link

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

0 votes

Comments

thanks, it is the root cause.

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 log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,019

Question asked: Mar 07, 12:15 p.m.

Question was seen: 397 times

Last updated: Mar 08, 2:57 a.m.

Related questions
Confirmation Cancel Confirm