3

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?

Mat
  • 202,337
  • 40
  • 393
  • 406
Jayan
  • 18,003
  • 15
  • 89
  • 143

2 Answers2

2

The following suggestion should be super fast compared to lshistory but it does not support any generic "time" reference, only from earlier manually saved entries. It also depends on multisite.

If you only want to check if there is any (local) change made to each of the individual vobs, you could perhaps use the multitool lsepoch command to compare the epoch number with the previous.

Edit: Since I have no experience with UCM I did not notice at first, but as noted, this answer will only consider changes from the whole vob, not individual streams as the question asks for.

hlovdal
  • 26,565
  • 10
  • 94
  • 165
  • Unless the OP has multisite on all its Vobs, I feel a downvote coming very soon ;) See my answer. Multisite is a (licensing) scheme, and I deployed CCRC server long time ago to get rid of all that non-sense. – VonC May 07 '11 at 10:07
  • I have no idea of the costs involved, but I have no problem imagining that it is expensive. But if multisite is already installed and used, my suggestion should be a possibility. Your answer is more flexible. – hlovdal May 08 '11 at 22:28
  • the costs are... important; to say the least ;) But I am still waiting for the OP's feedback. – VonC May 08 '11 at 22:51
  • The multitool lsepoch considers any change on 'vob' where as I am looking for changes specific to a stream. – Jayan May 14 '11 at 05:25
2

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'.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250