It's all about the answers!

Ask a question

[SCM PlainJavaApi]How to check folder files in stream components


Kodac Hasubo (367) | asked Apr 27 '22, 1:22 a.m.
edited Apr 27 '22, 1:23 a.m.
(I'm using PlainJavaApi RTC7.0.2)

 I think SCM consists of streams, components and workspaces.


I want to know how to check for the existence of folders and files under the stream component.

I was able to get the folder name or file name in the component in the workspace. (Image on the right)
Method is childEntries
However, I don't know how to get folder and file names in stream components.
In which method can I get the folder or file name in the stream component?

The image below shows a difference between the stream component and the workspace component.

One answer



permanent link
Ralph Schoon (63.4k33646) | answered Apr 27 '22, 2:01 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Apr 27 '22, 7:56 a.m.

 https://github.com/jazz-community/ewm-scm-utils has various commands that operate on the current state of a workspace or stream (a repository workspace and a stream are pretty much the same). This includes iterating the component hierarchy and the file and folder hierarchy of a component. The source code is made open source and available for analysis. Speaking of analysis, the tool has code that analyzes the SCM content and builds metrices about it. That is where I would look first.


Comments
Ralph Schoon commented Apr 27 '22, 8:03 a.m. | edited Apr 27 '22, 9:36 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

In addition I would like to suggest to carefully study: https://jazz.net/library/article/126 as well as some other articles  from https://jazz.net/library/#sort=pubDate&tag=SCM to understand how EWM SCM works.  


The main point here being that a stream or a repository workspace has zero or more components in a hierarchy. The components represent a configuration selecting a set of changes that make up the data that can be represented to the user. 

Just because a stream has a component does not mean that a repository workspace would have the same component, or the same configuration of said component. This means the same component could have a configuration in the repository workspace that is empty - the components initial state. The assumption form the screenshot you should see anything in the workspace, because you see something in the component in the stream, above in your image is incorrect. 

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.