Search code examples
clearcasecleartoolclearcase-ucm

how to detect if there is any check in on a stream after a given time


We use clearcase UCM with 15 vobs.

We use cleartool lshistory -all -since "time" -nco vob1/ vob2/src/ vob3/tests/ ...many more... to detect changes since last time. This gives correct result, but takes too long on streams with lot of history.

Is there a way to return early if there is 'any change' on a stream, but not detailing that change? One options is to limit the lshistory to individual vobs, but that does not look elegant. I guess there is a better way to do this?


Solution

  • Multisite is off course not an option, due to huge license costs.
    You cannot make one vob multisite without having to make its adminvob/pvob also multisite, which in turn means other vobs associated to said adminvob, while not always multisited themselves, need to pay multisite license as well!.

    Depending on the level of information you are after, a simple and regular update on a snapshot view is enough to detect/update any changes, with results in the update.20xx-yy-zzT123456-0x.updt file.

    You can setup a cron job in charge of:

    • updating the snapshot UCM views (set on the streams you want to monitor, instead of a lshistory after any modification on any stream)
    • concatenating the result of the various updt files.

    Whenever you need to check for changes, read/parse the concatenated result made by your job (and have it reset/create new concatenated ones).

    This is a bit of scripting work, but for large histories, this will be much more efficient than the slow 'lshistory -all'.