3

Using ClearCase, how can I lock (or unlock) a directory and its complete content recursively?

(It seems to me that neither the GUI nor cleartool supports recursive (un)locking, so probably I would have to write a batch file recursing over all the content of a directory. Maybe I overlooked something?)

1 Answer 1

2

Since it does not seem possible to use cleartool unlock recursively, one solution could be to combine it to a cleartool find command:

# Windows syntax:
cleartool find adirectory -exec "cleartool unlock \"%CLEARCASE_PN%\""
# Unix syntax:
cleartool find adirectory -exec 'cleartool unlock "$CLEARCASE_PN"'

If you execute it in the path where adirectory is to be unlocked, it will do so for adirectory and all its content.

2
  • For the sake of completeness: %CLEARCASE_PN% is “Path name of selected element or VOB symbolic link”.
    – Martin
    Apr 28, 2015 at 9:12
  • 1
    @Martin indeed. I suppose here it is preferable to CLEARCASE_XPN, which would select the version.
    – VonC
    Apr 28, 2015 at 9:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.