5

I am working in a dynamic view in Unix platform. I need to hijack a file temporarily and cancel the hijacking later. But the command chmod +w filename is not working.
I get the message chmod: WARNING: can't change filename.
I can change the read-only attribute of the file from a snapshot view in windows.

Questions:

  1. Is hijacking possible in a dynamic view? If yes, how?
  2. Is there a cleartool command to cancel hijacking of a file?
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
Raihan
  • 10,095
  • 5
  • 27
  • 45

2 Answers2

9

One of the side-effects of a dynamic view is that ClearCase will control the attributes of the file you access to through the network, as opposed of a snapshot view (where everything is copied on your hard drive).

1/ Yes it is possible, even though it isn't really an "hijacked" state.
The dynamic equivalent is named "eclipsed": the idea is for a private file of the same name than a versioned one to take the place ("eclipsing") of the versioned file.

You simply make a copy of that file as a backup, and make that file invisible by not selecting it (type "cleartool edcs" anywhere within the dynamic view):

element /vob/path/to/file -none

Then you rename the backup copy, restoring its original name.

eclipsed file

2/ to undo an eclipsed file, you simply move it or delete it.
The versionned file (eclipsed by the private one) is restored instantly.

See IBM article "About eclipsed files and ClearCase" for more.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I tried this in a UCM view and couldn't get it to work. Is there a way to do this in a UCM view? – Jozef Aug 16 '18 at 20:53
  • 1
    @Jozef Sure as long as it is a dynamic view, and that you put that rule *before* the one selecting the LATEST from the branch associated to the UCM stream. – VonC Aug 16 '18 at 20:55
1

Why not doing an unreserved checkout?

cleartool checkout -unreserved filename

Mazzaroth
  • 801
  • 9
  • 11
  • `cleartool: Error: To operate on UCM branch, must be set to an activity and a UCM view.` – Raihan Oct 17 '11 at 20:27
  • buddy. In UCM each view is associated with an activity. If you see the properties of view , you can see whether any activity is associated with it or not. If there is no activity is associated then you can't checkout/checkin. His command is useful. – Samselvaprabu Jan 10 '12 at 03:06