派生对象的引用无效

References of derived objects are invalid

有一些派生对象引用了视图。但是,引用视图没有该派生对象。

有没有办法删除那些带有 invalid/unused 引用的派生对象 (DO)?

(我认为问题的原因是删除了视图。我们有有问题的视图,不得不强制删除它们(使用 uuid)。然后我们创建了具有相同名称的新视图。现在,一个 DO有对视图的引用(我看不到 uuid)但该视图中未使用 DO。我怀疑引用的视图是旧视图)

如果它是已删除的视图,您可以删除对该视图的所有引用:

cleartool rmview -vob /vobs/MyVob -force -uuid 3c2ed44a.eda842f1.a7f8.73:09:e2:c9:12:ac

将/vobs/MyVob替换为使用视图的Vob标签。
并将 3c2ed44a.eda842f1.a7f8.73:09:e2:c9:12:ac 替换为旧的已删除视图 uuid。

您可以通过以下方式找到该 uuid:

cleartool descr -l vob:/vobs/MyVob

在“How to remove checked-out references of a view from a VOB”之后。

但是,如果您提到“我们的视图有问题,并且不得不强制删除它们(使用 uuid)”,那么 cleartool rmview 命令可能不足以 un-reference 那些 DO (派生对象)。

有一个old issue for ClearCase 7 about that

该方法(rmview --force --uuid 已通过“About rgy_getuuid_by_uuid failed errors”确认:

For example, clearmake may provide the following warning when attempting to access a view that no longer exists, but had sharable Derived Objects:

clearmake: Warning: View "ccsvr:c:\ccstg\views\tempview2.vws" unavailable -
This process will not contact the view again for 60 minutes.

If the view was removed or is inaccessible, references to the view have to be removed with the cleartool rmview -uuid command.
This command will remove all references to a given view in all mounted VOBs (review to technote 1122515 for more details):

这里又显示了一个 rmview --uuid

这是我找到的慢解决方案:我列出了每个 vob 中的所有 DO (cleartool lsdo -recurse),然后在视图中列出了所有使用过的 DO (cleartool lsprivate -do)。然后我列出了不在第二个列表中的那些。我为这些项目写了一个 rmdo 脚本。