Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
jazzBox Absent Member.
Absent Member.
407 views

SDK stcmd - Export List of All Projects/Files/Versions

 Is there a stcmd that will for a project list all projects->subprojects->files->versions?

IE:

 

MainProject

 -Project 1

    -SP 1

    -SP 2

 -Project 2

 -Project 3

  

Thanks

 

0 Likes
3 Replies
Micro Focus Expert
Micro Focus Expert

RE: SDK stcmd - Export List of All Projects/Files/Versions

when you say sub-projects do you mean views?
yes, you could use
stcmd select * from file history into "pathToOutputFile" -p "username:password2host:port/projectname/viewname"

this will list all files with all 'versions' - history - for a view.
i guess you could iterate over that using list-projects & list-views to produce the desired output.
you'd probably need to script something in powershell
jazzBox Absent Member.
Absent Member.

RE: SDK stcmd - Export List of All Projects/Files/Versions

Thanks for your response..

These don't seem to be views.

However, say I start a bit more simply, for example:

If I want to write out all projects under Project1,

Which would give me a list of SP1, SP2 ... SPn

What's a good way to get that output?
0 Likes
Micro Focus Expert
Micro Focus Expert

RE: SDK stcmd - Export List of All Projects/Files/Versions

ok, so, that's the piece i'm struggling with, then.

we have no concept of sub-projects of a project in starteam...
(that's why i thought you were referring to view)

a project is a super-container. it contains views in a view hierarchy.
a view is a super container. it contains folders in a folder hierarchy.
folders are containers which contain files, change requests, tasks, etc.

there's no such thing as a sub-project.

to get the list of projects in the starteam server, you'd use stcmd list-projects
to get the list of views in a given project, you'd use stcmd list-views parameterized to project (-p)
to get the list of files, you'd use stcmd select all from file parameterized to a project/view (-p)

i hope this helps
anil
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.