PDA

View Full Version : ClearCase: Removing Hard Links


Tony George
05-04-2004, 03:09 PM
Hi,

We were previously using an "evil twins" trigger that would create a
hard-link between two directory versions if you tried to create a duplicate
element. This has caused us problems, though, so we would like to remove
the hard link. Essentially, this is the situation.

Create file 1 in version 1 of dir A.
Move file 1 to dir B.
Create file 1 in version 2 of dir A.
Trigger pops up saying that previous version of A already has 1.
Hard link created between version 1 of dir A and version 2.

Now I see file 1. The problem is that file 1 is the same as what's in dir
B. When I try to check out file 1 in dir A, it checks out file 1 in dir B
also. If I do an "ls -li" I can see that they both have the same i-node.

Any ideas on how I can get out of this situation cleanly?

Thanks in advance.

Tony

Marc Girod
05-05-2004, 01:27 AM
>>>>> "TG" == Tony George <tony.george@ericsson.com> writes:

TG> Any ideas on how I can get out of this situation cleanly?

Do I understand correctly: you want to allow the creation of "evil
twins" in the case when the previous avatar hasn't been removed, but
moved elsewhere, right?

I assume you still want to avoid evil twins otherwise?

I can think at ways to detect the difference, but they wouldn't
qualify as fast enough for use in a trigger, I'm afraid.

[ I don't use an evil twin trigger myself. I tend to think triggers
are more evil than twins. But this depends on the users. ]

--
Marc Girod P.O. Box 323 Voice: +358-71 80 25581
Nokia BI 00045 NOKIA Group Mobile: +358-50 38 78415
Valimo 21 / B616 Finland Fax: +358-71 80 64474

Liang
05-23-2004, 05:39 PM
"Tony George" <tony.george@ericsson.com> wrote in message
news:c797me$ptl$1@newstree.wise.edt.ericsson.se... Hi, We were previously using an "evil twins" trigger that would create a hard-link between two directory versions if you tried to create a
duplicate element. This has caused us problems, though, so we would like to remove the hard link. Essentially, this is the situation. Create file 1 in version 1 of dir A. Move file 1 to dir B. Create file 1 in version 2 of dir A. Trigger pops up saying that previous version of A already has 1. Hard link created between version 1 of dir A and version 2. Now I see file 1. The problem is that file 1 is the same as what's in dir B. When I try to check out file 1 in dir A, it checks out file 1 in dir B also. If I do an "ls -li" I can see that they both have the same i-node.
Do i understand correctly: you want to create a 'new' file 1 in the version
2 of dir A. And the 'new' file 1 should have a different i-node of the 'old'
file 1 in the version 1 of dir A.

I don't know how your trigger works. Does it fire for 'mkelem' event only?
if so, maybe you can try to create a file2 in version 2 of dir A, and then
'mv' it to 'file 1'. Then, the trigger will not fire.
Any ideas on how I can get out of this situation cleanly? Thanks in advance. Tony


MyLounge.com Site Map
Forum: Cars, Cell Phone, Database, Games, Home Improvement, IT, Music, School, Sports, Web Design, Web Server, Weight Loss

The MyLounge.com forum is intended for informational use only and should not be relied upon and is not a substitute for any advice. The information contained on MyLounge.com are opinions and suggestions of members and is not a representation of the opinions of MyLounge.com. MyLounge.com does not warrant or vouch for the accuracy, completeness or usefulness of any postings or the qualifications of any person responding. Please consult a expert or seek the services of an attorney in your area for more accuracy on your specific situation. Please note that our forums also serve as mirrors to Usenet newsgroups. Many posts you see on our forums are made by newsgroup users who may not be members of MyLounge.com Term of Service