简体   繁体   English

当stcmd co与-vl标志文件一起使用时,即使在第二次执行命令时,

[英]when using stcmd co with -vl flag file is being checkout even at the second time the command is being executed

Actually I have 2 different questions regarding the stcmd co with -vl flag: 实际上,关于带有-vl标志的stcmd co,我有2个不同的问题:

1) when using stcmd co without -vl flag, the file is being checked out only at the first time. 1)使用不带-vl标志的stcmd co时,仅在第一次检出文件。 If I run it again the file is being skipped. 如果我再次运行它,该文件将被跳过。 BUT when adding the -vl flag to the stcmd co command, the file is being checked out at each and every run. 但是,当将-vl标志添加到stcmd co命令时,每次运行都会检出该文件。 How can I avoid it? 我该如何避免呢? (I tried to run -f NCO but then when using different label the file was not checked out as well.) (我尝试运行-f NCO,但是当使用其他标签时,文件也未检出。)
2) I had 1 file with 2 revisions, after I checked out the file by label of the first revision using stcmd co and then tried to run stcmd co without any label specified in order to get latest version, I got message that the file is modified therefor it hasn't been checkout. 2)我有一个具有2个修订版本的文件,在我使用stcmd co按第一个修订版本的标签签出该文件,然后尝试运行没有指定任何标签的stcmd co以获得最新版本后,我得到了该文件为修改后尚未结帐。 Since I want to get only the changed files I want to avoid the -force option. 由于我只想获取更改的文件,因此我想避免使用-force选项。 Any other way to force the file to be checked out? 还有其他方法可以强制检出文件吗?

Thanks 谢谢

Three things needs to be changed: 需要三样东西被改变:

  1. Checkout by Config-label , not by View-Label - use -cfgl LABELNAME instead of -vl LABELNAME 通过Config-label而不是通过View-Label -cfgl LABELNAME -使用-cfgl LABELNAME代替-vl LABELNAME
    this will correctly identify the status of your local files in comparison to the given label. 与给定标签相比,这将正确识别本地文件的状态。

  2. Use a filter to check-out only files that needs to be checked-out: 使用过滤器仅检出需要检出的文件:
    -filter MGIOU
    (this means: All files, except those that are 'Current') (这意味着:所有文件,“当前”文件除外)

  3. Do use force (the -o flag) to make sure the filter works as intended. 一定要用力-o标志)来确保过滤器按预期工作。


To sum it up, the command should look like this: 总结起来,该命令应如下所示:

stcmd co -p "user:pwd@host:port/MyProject/MyView/"  ...  -o  -filter MGIOU  -cfgl  "MY_LABEL"  ...

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

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