ClearCase:不同目录下具有相同oid的文件

ClearCase: files with the same oid in diferent directories

我遇到了一些让我难过的事情。

我们有几个在各个方面都相同的文件(包括它们的 oid - 所以它们肯定不是邪恶的双胞胎)但位于 两个 不同的目录。查看元素属性,它们都包含相同的路径名,但它们也可以在第二个目录中找到。

我的第一个想法是它们(或它们的父目录之一)之间必须有一个符号链接。我在 VOB 的根目录中使用了以下命令来找到它们:

cleartool find . -kind slink -print

然而,它returns没有结果。

有人知道这是怎么回事吗?

由于在 ClearCase 中文件夹负责记录其元素列表,因此请描述该重复文件的父文件夹。

两个不同的文件夹可以记录同一个文件。

更准确地说,检查for an hardlink(不仅仅是软link 'slink')

A hardlink is an additional entry in a directory for an existing file.
Only one copy of the file exists on the harddisk. If you modify any copy, you modify all other copies. ClearCase does this at directory structure through the same inode and increases the reference count by 1.

请注意,当您使用 find -all 时,只会报告一个元素的一个实例,即使一个或多个 VOB 硬 link 指向该元素。显示元素名称或 VOB 硬 link 之一。

在“Identifying hard links within a VOB”查看更多信息。

use cleartool find executed as follows from the root of the VOB:

cleartool find -all -exec 'cleartool describe -fmt "%[aliases]ACQp\n" $CLEARCASE_XPN'

This output will provide for you a list of all the elements in the VOB, and if a given element has more than one hardlink, the other hard link will be displayed after a comma in the list.
The output will look similar to the following:

"/vobs/TestVOB1@@/main/dir1/7/1.txt", "/vobs/TestVOB1@@/main/dir1/7/1.foo.txt"

Finally, the following command will provide you only the elements with hard links:

cleartool find -all -exec 'cleartool describe -fmt "%[aliases]ACQp\n" $CLEARCASE_XPN' | grep ","