1

I have been looking for a recursive checkout/checkin script, and everything that I have seen has been for base ClearCase only. Is there a reason for this? Does anyone have a script that can be used for ClearCase UCM?

I also don't personally see a reason that someone would have to checkout a bunch of files at once. Are there any major pitfalls to giving someone the ability to do this?

Added:

I found this, but I am unsure if this is the best way. It seems that it has your commands. I would like them to have the ability to do this with the GUI, since they aren't too familiar with the command line.

http://www.ibm.com/developerworks/rational/library/4687.html

Script to recursively Check Out and Check In

Note: For the following procedures, you need to have local administration rights to be able to customize a ClearCase menu.

Checkout For the check out recursively option, do the following: Start the clearmenuadmin.exe utility (to do this, click Start > Run, and type clearmenuadmin.exe) In the Object type tab, select the directory object. Choose checked-in as the Object state Click the new button in the Available menu Choices pane, and then enter the following information in the appropriate fields: Menu Text: Checkout (recursively)... Help Text: Check out the selected item recursively... Command Type: Executable/Regentry Command: Software\Atria\ClearCase\CurrentVersion\ContextMenus\CmdLineExe Initial Directory:
Arguments: /c cleartool find $file -exec "cmd /c cleartool checkout -nc \"%CLEARCASE_PN%\"" Comment:

When this is done, you can add this new menu entry to the This menu contents pane by pressing the Add button. Position it as desired with the Move up button. After completing this customization, choose Configuration>Apply to apply the changes. Then you can test it in Windows Explorer.

Checkin

For the check in recursively option, do the following: Start the clearmenuadmin.exe utility In the Object type tab, select the directory object. Choose checked-in as the Object state Click the new button in the Available menu Choices pane, and then enter the following information in the appropriate fields: Menu Text: Checkin (recursively)... Help Text: Check in the selected item recursively... Command Type: Executable/Regentry Command: Software\Atria\ClearCase\CurrentVersion\ContextMenus\CmdLineExe Initial Directory:
Arguments: /c cleartool find $file -exec "cmd /c cleartool checkin -nc -identical \"%CLEARCASE_PN%\"" Comment:

When this is done, you can add this new menu entry to the menu contents pane, position it as desired, and apply the changes as described in the previous procedure, and then test it in Windows Explorer.Command:

Is this the best way to do it? (I understand the Arguements, but the Command is throwing me. (Is this the .exe on the local machine or server?) Can this be available to anyone or would I have to set this up on each machine that people are using?)

Rubasu
  • 379
  • 3
  • 14

1 Answers1

1

Any UCM recursive checkout would be identical to a base ClearCase one (like in "How do I perform a recursive checkout using ClearCase?").

The only difference would be the need to check for a current set activity, or to create/set one UCM activity before making any checkout.

Now, UCM or not, checkout many files without knowing if they will be modified or not is not a very good idea, because you have no easy way to detect said unmodified files when it comes to check-in all the checked out files.
(That is why a recursive checkin will have to include two steps: see "Recursive checkin using Clearcase")

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I edited to add a bit more information about giving the ability to do this through the gui. Thank you, VonC. – Rubasu May 07 '12 at 19:03