本文介绍了Python和ClearCase setview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I would like to set to a clearcase view from a python script, and then execute commands within that view. I have tried using various methods outlined here:

但是我没有任何成功。有人知道如何做到这一点吗?

but I have not had any success. Does anyone know how to accomplish this?

推荐答案

我不建议设置视图,因为本身产生了一个新的过程。

我真的更喜欢使用 / view / viewTag / aVob /。 。在( cleartool startview viewTag

I wouldn't recommend setting a view, because setview itself spawn a new process.
I really prefer working with /view/viewTag/aVob/... after starting the view (cleartool startview viewTag )

生成过程指的是生成过程。在我看来,这个问题使一切变得太复杂了,并解释了为什么会有类似以下的技术说明:

The "spawn process" issue makes the all thing too complex in my opinion, and explains why you have technotes like:


  • " 。

  • "Setting into a view from a shell script does not process the remaining commands in the script".

这意味着当前进程的文本和代码段(在本例中为包含所有命令的脚本)被正在执行的程序替换,该程序是通过运行 cleartool setview cmview 调用的外壳程序。 br />
因此,在 setview 的调用点之外,不会处理任何命令。

This means current process's text and code segments, which in this case is the script that contains all the commands, is replaced by the program getting executed, which is the shell invoked by running cleartool setview cmview.
Hence, none of the commands are processed beyond the point of invocation of the setview.




    • "How spawned shell is handled by issuing setview -exe or -login and affect on subshell process"
    • 因此,如果您真的想要要使用 setview ,您可以(不能直接对自己进行测试):

      So if you really want to use setview, you could (not tested directly myself):


      • 有一个调用 setview

      • setview 调用将使用 -exec 参数是另一个python脚本(当 / vobs 配置了上述set视图的内容时,您想做的事情。

      • have a python script calling setview
      • but that setview call would be with an -exec parameter being another python script (doing what you want to do when that /vobs is configured with the content of said set view.

      这篇关于Python和ClearCase setview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-16 06:18