我想从 python 脚本设置为 clearcase View ,然后在该 View 中执行命令。我尝试使用此处概述的各种方法:

subprocess

但我没有取得任何成功。有谁知道如何做到这一点?

最佳答案

我不建议设置 View ,因为 setview 本身会产生一个新进程。
我真的更喜欢在 starting the view ( /view/viewTag/aVob/... ) 之后使用 cleartool startview viewTag在我看来,“生成过程”问题使所有事情变得过于复杂,并解释了为什么您有以下技术说明:

  • Setting into a view from a shell script does not process the remaining commands in the script”。


  • "How spawned shell is handled by issuing setview -exe or -login and affect on subshell process "


  • 所以如果你真的想使用 setview ,你可以(我自己没有直接测试):
  • 有一个 python 脚本调用 setview
  • 但该 setview 调用将使用 -exec 参数作为另一个 python 脚本(当 /vobs 配置了所述集合 View 的内容时,执行您想做的事情。
  • 关于Python 和 ClearCase setview,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/10252436/

    10-11 06:32