简体   繁体   English

如何检出starTeam版本控制工具的所有版本

[英]how to check out all versions of starTeam version control tool

how to check out all versions of starTeam version tool. 如何签出starTeam版本工具的所有版本。 I wanted to check out all versions for particular file and that way i wanted to do it for all of my files on production server. 我想签出特定文件的所有版本,这样我想对生产服务器上的所有文件进行检查。 can anyone suggest what are the available options. 谁能建议可用的选项是什么。

Just to clarify, is your intention to check out all the labelled versions of a project from starteam in some automated manner? 只是为了澄清一下,您是否打算以某种自动化方式从starteam签出项目的所有标记版本?

If so, then I think you will want to use the " stcmd " command-line tool that comes with starteam. 如果是这样,那么我认为您将希望使用starteam随附的“ stcmd ”命令行工具。


'stcmd' location “ stcmd”位置

  • For Linux: It resides in the "starteam/bin/" sub-folder of your install 对于Linux:它位于您安装的“ starteam / bin /”子文件夹中
  • For Windows: It resides somewhere like "C:\\Program Files\\Borland\\StarTeam SDK 14.0\\lib\\stcmd.exe" 对于Windows:它位于类似“ C:\\ Program Files \\ Borland \\ StarTeam SDK 14.0 \\ lib \\ stcmd.exe”的位置

Performing checkout via 'stcmd' 通过'stcmd'执行结帐

The stcmd checkout command is " stcmd co ... " (followed by various parameters). stcmd checkout命令是“ stcmd co ... ”(后面是各种参数)。 Here's a dummy example: 这是一个虚拟的例子:

stcmd co -p " USER : PASSWD @ SERVER : PORT / PROJ / VIEW " -cfgl LABELNAME -eol lf -o -rp /local/path/to/working/folder -filter MOI stcmd co -p“ 用户PASSWD @ 服务器端口 / 项目 / 视图 ” -cfgl 标签名称 -eol lf -o -rp / local / path / to / working / folder -filter MOI

Replace the items in bold with your username, password, server address+port, project-name, view-name, label-name and checkout-path (working folder). 用用户名,密码,服务器地址+端口,项目名称,视图名称,标签名称和签出路径(工作文件夹)替换粗体项目。

You can learn more about the various other stcmd checkout parameters (eg, -eol, -o, -filter) by typing: 您可以通过键入以下内容来了解​​有关其他各种stcmd检出参数(例如-eol,-o,-filter)的更多信息:

stcmd co -?

It's worth assessing those extra parameters to decide if they are what you need in your scenario, or if you prefer different settings to this. 值得评估那些额外的参数,以决定它们是否是您方案中所需的参数,或者您是否更喜欢其他设置。


Getting a list of all labels in a view 获取视图中所有标签的列表

Ok, so you can now checkout, but the other aspect of your question I think is the ability to iterate through a set of checkouts (where I think you intended to check out each individual label). 好的,现在您可以签出了,但是我认为问题的另一方面是能够迭代一组签出(我认为您打算签出每个标签)的能力。

So to get a list of labels, you can do it this way: 因此,要获取标签列表,可以采用以下方式:

stcmd list-labels -p " USER : PASSWD @ SERVER : PORT / PROJ / VIEW " stcmd list-labels -p“ 用户PASSWD @ 服务器端口 / 项目 / 视图

...or alternatively, the stcmd tool now has an sql-like querying system that might do the trick too, but I couldn't get it to work this way: ...或者,stcmd工具现在具有类似sql的查询系统,该系统也可以解决该问题,但我无法通过这种方式工作:

stcmd connect username@server:port
stcmd set project = PROJ view = VIEW
stcmd select Name from Label

This presently results in an error, even though I think it ought to work that way, so it might be a bug worth reporting to microfocus on their forums at this location (if you're interested in that approach): 即使我认为应该以这种方式工作,目前也会导致错误,因此可能值得报告此漏洞,以使其专注于此位置的论坛(如果您对此方法感兴趣):

http://community.microfocus.com/borland/managetrack/starteam/f/ http://community.microfocus.com/borland/managetrack/starteam/f/


Putting it all together 放在一起

After you've got your list of labels and the ability to check out the label, hopefully you'll be able to fuse the two mechanisms together in some sort of scripting language that suits you. 在获得标签列表并能够签出标签之后,希望您能够将这两种机制以适合您的某种脚本语言融合在一起。


Via the StarTeam SDK 通过StarTeam SDK

Another approach to this could be to write a java app that makes use of the starteam SDK (this is Microfocus' java-api for starteam). 另一个解决方法是编写一个使用starteam SDK的Java应用程序(这是Microfocus用于starteam的java-api)。

This path will take a bit more elbow-grease and time, the SDK has the reward of giving you more control and access to the database information than the stcmd tool can provide. 这条路径将花费更多的时间和时间,与stcmd工具所提供的相比,SDK带来的好处是可以为您提供更多的控制和对数据库信息的访问。


Conclusion 结论

So my guess is that for your initial needs, some scripted use of stcmd will get the job done for you. 因此,我的猜测是,对于您的初始需求,一些stcmd的脚本化使用将为您完成工作。 If you need more details than the stcmd tool can give you, you might have to dig into the StarTeam SDK as an alternative. 如果您需要的详细信息超出了stcmd工具所能提供的范围,则可能需要深入研究StarTeam SDK。

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

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