1

我以某种方式在不属于活动的透明大小写 UCM 中创建了一个文件的分支。我不知道如何重现此问题,但我的流显示了许多具有此症状的文件。我怎样才能找到这些文件,删除它们,并防止它在未来再次发生?

这是一个此类文件的示例,其名称经过编辑以保护无辜者:

xxxxxxxxxxx.cpp@@/main/xxx-integration/xxxxxx-xxxxxxxx/0 Rule: .../xxx-xxxxxxx/LATEST

Act lsact -long | grep <filename>不返回任何结果。

更新:我使用 find 命令来追踪上面给出(和编辑)的分支上的所有文件,但我仍然不明白这个问题。

根据 VonC 的回答,我最终在哪里做:

cleartool find . -type f -version "version(.../xxx/LATEST)&&version(.../xxx/0)" -print | tee ~/tmp/files2

然后我通读生成的文件列表以确保它们有意义,然后我验证它们没有附加到活动并删除了版本:

cat ~/tmp/files2 | while read
do 
    if [ -z "$(ct describe -fmt "%[activity]p" $REPLY)" ]
    then 
        ct rmbranch -f ${REPLY%/0}
    fi
done
4

1 回答 1

0

That can happen ig those file were checkout in a base ClearCase view, ie a non-UCM view, withg a simple config spec:

element * .../xxx-integration/LATEST -mkbranch xxxxxx-xxxxxxxx

You can use a find command similar to "How can I find all elements on a branch with version LATEST that has no label applied?".
The difference is: for each version found, you need to describe it in order to check if there is an activity attached to it or not (with a fmt_ccase):

cleartool describe -fmt "%[activity]p" "$CLEARCASE_XPN"
于 2013-08-29T19:07:06.117 回答