[cciug] Checkout of File Elements with Hardlinks

From: Robinson, Christopher (chr@hnc.com)
Date: Tue Jul 17 2001 - 13:32:22 EDT


In a dynamic view, when you checkout a file, it places a copy in your
view storage. The rule 'element * CHECKEDOUT' in your config spec makes
the dynamic view look at this copy. If the file element has a hard link
to it in a different directory, then in the other directory, the file
does not appear. It is listed as [checkedout but removed] because there
is not copy in view storage registered in that directory(it's in the
directory you originally checked out the file).

So the question is:
How do you make it so that when you checkout an element in a dynamic
view that is hardlinked in other places, the checkout shows up in other
places.

Also, after you checkin an element that is hardlinked somewhere else,
you actually have to do a 'ct setcs -current' to get the checkin visible
in other directories where it's hardlinked.

Anybody find some workarounds for any of this? I know hardlinks have
some disadvantages, but they have some advantages also so I'm trying to
find workarounds for the disadvantages. Maybe there are no workarounds.

One other thing, I've placed a label called "SHARED" on /main/0 for any
element that I create a hardlink to. This way I know it actually is
hardlinked in 2 places. Maybe I can write a post-checkin trigger that
checks for that label on /main/0 and possibly runs a 'cleartool setcs
-current' to update the dynamic view after the checkin.

I also wrote a script called findlinks.pl that can detect if an element
has hardlinks to it and it will report the fullpath of the hardlinks.

Any ideas for workarounds on the [checkedout but removed] item and [ct
setcs -current] item are very much appreciated.

Chris Robinson
Sr. Configuration Engineer
HNC Software Inc.
858-799-1665
chr@hnc.com
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



This archive was generated by hypermail 2b29 : Tue Jul 31 2001 - 22:03:56 EDT