Tag Archives: ClearCase

Diff labels in ClearCase

Many customers seem to be using the ClearCase revision control system. While ClearCase is very powerful and useful in many ways, I have struggled to find a simple command to show the difference between two labels, i.e. which files that have been change between the application of these two labels.

I have finally found how this is done:

cleartool find -all -element ‘{lbtype_sub(LABEL1) && lbtype_sub(LABEL2)}’ -ver ‘{lbtype(LABEL1) && ! lbtype(LABEL2)}’ -nxname -print

Just replace LABEL1 and LABEL2 with the labels of choice, and off you go. This will only show files which have both labels, files recently created that only has one of the labels on them will not be found – however since the above command would should the verified folder (where the file was added) those files are easilly spotted as well.