简体   繁体   English

如何从StarTeam(stcmd.exe)获取标记的代码?

[英]How to get the labeled code from StarTeam(stcmd.exe)?

I want to get the code under particular label from StarTeam strictly using command line . 我想严格使用命令行从StarTeam获取特定标签下的代码。 I have come to know that I can use "stcmd.exe" for the same. 我已经知道我可以使用“stcmd.exe”。 But I am unable to find the particular command to get the labeled code. 但我无法找到获取标记代码的特定命令。

Can any one please help? 任何人都可以帮忙吗?

Thanks. 谢谢。

Documentation for the command line tools are here (page 51 has the checkout options): 这里有命令行工具的文档(第51页有结帐选项):

http://techpubs.borland.com/starteam/2009/en/ST_CmdTools_Help_en.pdf http://techpubs.borland.com/starteam/2009/en/ST_CmdTools_Help_en.pdf

The -cfgl switch allows you to specify the configuration label. -cfgl开关允许您指定配置标签。

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"

Google发现了这个: http//www.foxdata.com/starteam/faq/view_labels_and_how_to_use.htm所以看起来-vl选项允许你指定视图标签。

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. 作为对其他一些注释的澄清,-cfgl标志指定View标签,而-vl标志指定版本(Revision)标签。 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. 指定-cfgl相当于在gui中打开视图并将View Configuration设置为给定的View标签,并且可能正是您正在寻找的,就像Dougman所说的那样。 Specifying -vl is the equivalent of opening the gui and picking that label in the Checkout dialog. 指定-vl相当于在Checkout对话框中打开gui并选择该标签。

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. 至于使用时髦字符指定密码,可以使用%转义它们,如上所示,或使用-pwdfile或-epwdfile标志并将密码存储在单独的文件中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM