问题描述
我有一个简单的应用程序,该应用程序从用户那里输入CC流名称的输入,并假设要从此流存储库中返回特定文件的内容。
<我已经尝试过使用简单的shell脚本来做到这一点:$ b $ b用户输入流名称,
java接收流名称,运行一个进程,该进程运行一个脚本 myccscript.sh,其中包含 myinput = $ 1; cleartool setview $ myinput(或类似的东西)。
然后我尝试读取文件并将其内容打印在Java端。
但是,该过程完成后-该视图不是用户输入的视图-该环境可能仅对Ive创建的过程有效。
如何将Clearcase视图更改为主Java进程?
谢谢!
请勿使用。它产生一个子外壳,它将使所有其他命令不起作用(因为它们在父外壳中执行)
始终使用动态视图的完整路径:
/ view / aView / vobs / aVob / ....
您将在以下位置找到相同的问题(和不使用setview的相同建议):
您将在 。
i have a simple application, which receives input from a user for a CC stream name, and is suppose to return the content of a specific file from this stream repository.
I have tried doing this using a simple shell script:user enters stream name,java receives stream name, runs a process which runs a script "myccscript.sh" which contains "myinput=$1; cleartool setview $myinput" (or something like that).
then i try reading the file and printing it's content in the java side.BUT, after the process is finished - the view is not the view from the user input - that environment was probably only valid for the process Ive created.
how do i change the clearcase view to the main java process?Thanks!
Don't use cleartool setview
. It spawns a sub-shell which will make all your other command not working (since they are executed in the parent shell)
Always use the full path of a dynamic view:
/view/aView/vobs/aVob/....
You will find the very same issue (and the very same advice "don't use setview") in:
- "Dynamic views of ClearCase not integrating in Jenkins"
- "using SSH to run a cleartool command with agruments on remote a linux machine"
- "script doesn't run while executing in clearcase"
You will find a concrete example of that issue in "Python and ClearCase setview".
这篇关于Clearcase和Java进程:更改视图不适用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!