问题
I want to get the code under particular label from StarTeam strictly using command line. I have come to know that I can use "stcmd.exe" for the same. But I am unable to find the particular command to get the labeled code.
Can any one please help?
Thanks.
回答1:
Documentation for the command line tools are here (page 51 has the checkout options):
http://techpubs.borland.com/starteam/2009/en/ST_CmdTools_Help_en.pdf
The -cfgl
switch allows you to specify the configuration label.
Edit with updated syntax
The full syntax to do a checkout to a specified directory based on a configuration label is:
stcmd.exe co -p "<username>:<password>@<starteamServerAndPort>/<project>/<view>/" -rp "<workingDir>" -o -cfgl "<labelName>"
So with the following parameters:
username=test
password=pw
starteamServerAndPort=10.209.30.22:49201
project=MyProject
view=MyView
workingDir=d:\latest
lableName=MyLabel
Our command line call would be:
stcmd.exe co -p "test:pw@10.209.30.22:49201/MyProject/MyView/" -rp "d:\latest" -o -cfgl "MyLabel"
回答2:
Google found this: http://www.foxdata.com/starteam/faq/view_labels_and_how_to_use.htm So it seems the -vl option lets you specify the view label.
回答3:
As a clarification to some of the other comments, the -cfgl flag specifies a View label while the -vl flag specifies a version (Revision) label. Specifying -cfgl is the equivalent of opening the view in the gui and setting the View Configuration to the given View label and is probably what you're looking for, like Dougman said. Specifying -vl is the equivalent of opening the gui and picking that label in the Checkout dialog.
As for specifying passwords with funky characters, either escape them with % as shown above or use the -pwdfile or -epwdfile flags and store the password in a separate file.
来源:https://stackoverflow.com/questions/2198825/how-to-get-the-labeled-code-from-starteamstcmd-exe