Frequently Modified Files in Clearcase

63 Views Asked by At

I am very new to Clearcase and one of the task that I have got on my hand is to find frequently modified files in ClearCase, Suppose we have an integration stream and there are numerous files in our stream, need to know of certain files which are modified frequently like a certain file is modified 5 times in last two months.

I have access to ClearCase commands as well as GUI

Is there a way we can have solution to this problem.

Thanks

1

There are 1 best solutions below

9
VonC On

You can do, following find examples, a search between two dates:

cleartool find . -version "{created_since(date1) &&
                           !created_since(date2) &&
                           brtype(myIntStream)" -exec "cleartool descr -fmt "%En"\
|sort| uniq -c | sort -n

(This is the Windows syntax, which means you need GoW (Gnu On Windows) installed for the v and uniq commands.

As Brian Cowan adds in the comments, the command would be:

cleartool find -all -version "{created_since(date1) &&
                           !created_since(date2) &&
                           brtype(myIntStream)" -exec "cleartool desc -fmt \"%En\n\" \"%CLEARCASE_XPN\"" \
|sort| uniq -c | sort -n

On Unix:

cleartool find -all -version "{created_since(date1) &&
                           !created_since(date2) &&
                           brtype(myIntStream)" -exec  'cleartool desc -fmt "%En\n" "$CLEARCASE_XPN"' \
|sort| uniq -c | sort -n

-all instead of the current directory format, to avoid issues if the command isn't run at the VOB root.

If you don't care about the interval, but only want the last 2 months, drop the !created_since line.
Alternatively, use "today" as the second date, though that would everything modified since midnight your local on the day you run the command.