1

I'd like to change the structure of our source code inside ClearCase before using a custom script to export that to another SCM system. As the original code may still change slightly, I did this by symlinking the contents of the existing folders into the new structure.

Now the desired folder structure has changed and I need to move those symlinks (or start the whole process over, which is my fall-back strategy if no one can help me here). But after moving any symlinks (inside the same VOB in a dynamic view by the way), Windows Explorer does not show the elements at the new position. ClearCase Explorer does show them as expected, in the new location and tagged as a symbolic link; but they appearantly lost their target, as the option "Warp to target" in the context menu is greyed out.

Restarting the PC and un-/remounting the VOB all did nothing to better the situaton.

Can anyone tell me how this could happen, how to prevent this from happening again and possibly how I can restore the appearantly broken links?

SvenS
  • 795
  • 7
  • 15
  • Did you used `cleartool move` to move those symlinks (or a drag and drop within the ClearCase explorer?). Or did yo move them through an OS explorer? – VonC Sep 14 '11 at 11:02
  • I tried both Ctrl+X, Ctrk+V and Drag-Drop. The ClearCase online help did not give any special instructions when using these methods. – SvenS Sep 14 '11 at 11:25
  • Yes, but did you tried those move (Ctrl+X, Ctrk+V and Drag-Drop) through a *ClearCase* explorer or a *Windows* Explorer (i.e. without using ClearCase directly)? – VonC Sep 14 '11 at 11:41
  • Ah, sorry, it seems I didn't read your comment thoroughly enough :/ I moved them from within ClearCase Explorer. – SvenS Sep 14 '11 at 11:53

1 Answers1

1

If the target has itself changed, it seems normal than the VOB symlinks loses their target, and that the "Warp to Symlink Target" contextual menu doesn't work.

Check that your symlink (used here in a dynamic view) is a soft link.
But if move the link and its target change, I think it is quicker to remove and recreate the symlink.


Actually, the OP SvenS mentions in the comments:

the target path of symlinks may be stored relative to the link.
This seems to be the case, as I just moved them back to their previous location and the targets reappeared in windows Explorer.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Not the `target` has been moved, but the `link`. The original files are still in place, I only want to rearrange the links to them. On the matter of soft links: I followed the instructions in the help entry["To create a VOB symbolic link"](http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m0/index.jsp?topic=/com.ibm.rational.clearcase.hlp.doc/cc_main/to_create_slink_vob.htm) to create the links. – SvenS Sep 14 '11 at 12:32
  • But your answer nevertheless gave me the idea the target path of symlinks may be stored **relative to the link**. This seems to be the case, as I just moved them back to their previous location and the targets reappeared in windows Explorer. I'll post this as an answer and open a new question on how to properly move symlinks... Thanks for the thought! – SvenS Sep 14 '11 at 12:43
  • Hmpft, too low rep to answer my own question yet, I'm gonna mark this one as accepted. And here's the follow-up question on [how to move symlinks](http://stackoverflow.com/questions/7416800/how-to-move-symlink-keeping-the-target) for reference. – SvenS Sep 14 '11 at 13:20
  • 1
    @SvenS: I have included your conclusion in the answer for more visibility – VonC Sep 14 '11 at 13:47