且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

ClearCase-文件系统路径到元素路径

更新时间:2023-02-25 15:08:57

没有本机命令,只有负载

There is no native command, but the only load rule you need is based on a vob name.

因此,您需要一个能够执行以下操作的脚本:

So you need a script able to:

1 /删除所有内容,包括视图
的名称(您可以通过'< aPathTo> \VOB\Folder\ 获得该名称; cleartool cleartool lsview- s -cview)

1/ remove everything including the name of the view (which you can obtain with a '<aPathTo>\VOB\Folder\;cleartool cleartool lsview -s -cview)

D:\pkirkham_view\VOB\Folder => \VOB\Folder
U:\VOB\Folder\              => \VOB\Folder

2 /相应地建立加载规则:

2/ Build your load rule accordingly:

load \VOB\Folder

3 /将加载规则追加到您的配置规范中(如果您已经在视图中):

3/ Append that load rule to your config spec (if you are already within the view):

cleartool catcs > aConfisgpec.txt
echo "load \VOB\Folder" >> aConfisgpec.txt
cleartool setcs aConfisgpec.txt






OP注释:


The OP comments:


因此,如果我创建一个快照视图,其标签名称为 pkirkham_testing_view '放在路径' D:\thursday '上,子字符串提取方式如何?

So, if I create a snapshot view whose tag name is 'pkirkham_testing_view' on path 'D:\thursday', how is that a substring extract?

这很不错,因为可以用任何名称命名根目录。

我建议使用视图的标签命名该目录。

That is a good point, since one can name the root directory with any name.
I would recommend naming that directory with the tag of the view.

但这不是事实,您需要确定快照视图的根目录:

But that is not the case, you need to determine the root directory of a snapshot view:


  1. 以' D:\whatever\path\VOB\Folder '开始,

  2. try cleartool lsview -cview

  3. 如果响应正确,请执行cd ..并重复2。

  4. 如果错误退出,请从初始路径中删除该目录的子字符串。剩下的就是您的负载规则。

  1. start in 'D:\whatever\path\VOB\Folder',
  2. try a cleartool lsview -cview:
  3. if it respond correctly, cd .., and repeat 2.
  4. When it exit with an error, remove the substring of that directory from the initial path. What remains will be your load rule.