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

scm command [add component] - How to use -source-workspace option

Hello,

I have a question with regards to usage of one of scm command option.
The description of the [-s, --source-workspace] claims as below, but I have not being able to successfully run it on my environment.
Can anybody please tell me what is the correct way of running using the option?

[Provides the initial history from the specified workspace or stream. To specify the workspace or stream, use its name[@repo], alias, or UUID[@repo].]

I have checked the following command works fine.
("rtc" is the alias name and "TEST" is my repository ws)
> scm add component -r rtc TEST Build
Component (1000) "Build" successfully removed.

And now if I tried to use the -s option, an error occurs and cannot add component... They all fail.
> scm add component -r rtc TEST Build -s rtc
> scm add component -r rtc TEST Build -s rtc "BRM Stream" Build
> scm add component -r rtc TEST Build -s rtc TEST
> scm add component -r rtc TEST Build -s rtc TEST Build
> scm add component -r rtc TEST Build -s rtc TEST 1000

I have no idea how am I using this.
Thanks in advance.

0 votes



One answer

Permanent link
Can you post the error message?

In your command "scm add component -r rtc TEST Build -s rtc" it seems like "rtc" is a repository because it is provided as a value to the "-r" option. Do you have a repository workspace or stream called "rtc"?

If the source stream is "BRM Stream" then the command will be as follows: "scm add component -r rtc TEST Build -s "BRM Stream"

1 vote

Comments

Hi,
Thank you very much for your update and sorry for the confusion.
"rtc" = repository alias for "https://server:port/ccm"
"BRM Stream" = One of the stream in the source repository.
"TEST" = My repository ws.
"Build" = One of the component in the "BRM Stream.

I have tried the below commands and it failed with those errors...
>scm add component -r rtc TEST Build -s "BRM Stream"

Problem running 'add component':
Could not add components
Component 'Build' is not in workspace
Check the log for details about the error at XXXX. If you have configured custom logging check your log configuration settings for the path to the log file.

I don't really understand why it cannot find 'Build'. Is it trying to look into my repository ws?
And here is the log mentioned in the above message. But it is really long. If you need the whole log to know the issue, please let me know.



<date>2017-07-17T04:16:58</date>
    <millis>1500275818553</millis>
    <sequence>1</sequence>
    <logger></logger>
    <level>SEVERE</level>
    <class>com.ibm.team.filesystem.cli.core.util.StatusHelper</class>
    <method>logException</method>
    <thread>1</thread>
    <message>Could not add components</message>
    <exception>
<message>com.ibm.team.scm.common.ComponentNotInWorkspaceException: Component 'Build' is not in workspace</message>
<frame>
<class>com.ibm.team.scm.service.internal.utils.ComponentUtils</class>
<method>throwNotInWorkspaceException</method>
<line>105</line>
</frame>

 When you run 'scm list component "BRM Stream"' does it list the "Build" component?

Yes, it does.

>scm list components -r rtc "BRM Stream"
Workspace: (1011) "BRM Stream" <-> (1012) "JKE Banking Integration Stream"
  Component: (1013) "Banking Logic"
  Component: (1000) "Build"
  Component: (1014) "C# UI"
  Component: (1005) "Database"
  Component: (1001) "Java UI"
  Component: (1007) "Mobile"
  Component: (1009) "Prerequisites"
  Component: (1010) "Web UI"


I used ID, but it did not work either.

>scm add component -r rtc TEST 1000 -s 1011
Problem running 'add component':
Could not add components
Component 'Build' is not in workspace
Check the log for details about the error at "XXXX". If you have configured custom logging check your log configuration settings for the path to the log file.

I tried this on a 604 client and it worked fine. Which version of RTC are you using?

I am using 5.0.1
But I tried with 6.0.4 and the issue reproduced. What is the command you tried?

 I tried "scm add component -r rtc TEST 1000 -s 1011" (of course with different parameters) and it worked.

Hello,
Thanks for checking. It seems like when you specify a stream which is a flow target, it fails.
So it worked fine when I specified other streams/ws.
Now it is good to know it is working!

I'm just curious is this an expected behavior?

That's interesting. I don't recollect if I tried the workspace's flow target as the source workspace for add component.


By the way, instead of adding the component you should accept the component if it is the flow target.

1 vote

showing 5 of 9 show 4 more comments

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,029
× 1,204
× 113

Question asked: Jul 16 '17, 10:16 p.m.

Question was seen: 4,253 times

Last updated: Jul 20 '17, 5:38 a.m.

Confirmation Cancel Confirm