3

The clearfsimport command for Clearcase is always using RESERVED checkout while trying to import a project inside clearcase VOB.

Can you please tell me how to perform clearfsimport based project file import using UNRESERVED option instead of default RESERVED option?

AstroCB
  • 12,337
  • 20
  • 57
  • 73
user3806728
  • 301
  • 1
  • 6

1 Answers1

1

One way would be to set your ClearCase preferences to unreserved by default.
See "To set the default for reserved or unreserved checkouts (Windows)e"

Tools > Options and, in the Options window, click ClearCase Options.

Click Start > Programs > IBM Rational > IBM Rational ClearCase > User Preferences.

In the ClearCase User Options window, in the Check Out field, to make unreserved checkouts the default setting, clear Reserved.

But if you don't want to change the default (or you are on Linux), you can also define a post-op checkout trigger.

cleartool mktrtype -element -all -post checkout -exec '/opt/rational/clearcase/bin/cleartool unreserve -nc '$CLEARCASE_PN' TRIGGERNAME

You would set that trigger just for the duration of the clearfsimport.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I already tried "DEFAULT UNRESERVED" settings in the Windows GUI, but to no avail. My default is always UNRESERVED in the setup. – user3806728 Apr 07 '15 at 19:16
  • @user3806728 ok then: the trigger should work just fine. – VonC Apr 07 '15 at 19:21
  • There is already a trigger in the system which checked for RESERVED checkout and blocks cleafsimport because it is using the RESERVED checkout. I am looking for some way to tell clearfsimport not to use RESERVED checkout. Following is the TRIGGER -- cleartool mktrtype -nc -element -all -preop checkout -execwin "ccperl.exe \\Server\\CCstorage\\Triggers\\preop_checkout_unreserve.pl" unreserve_trigger@vob:\Test -- This trigger is rejecting clearfsimport because it is done RESERVED instead of UNRESERVED. – user3806728 Apr 07 '15 at 19:47
  • @user3806728 that is why the trigger I recommend is a *post-op* checkout, not preop. Maybe you can desactive the other trigger for the duration of the clearfsimport? – VonC Apr 07 '15 at 19:49
  • That's what I did temporarily. But I am looking for a permanent solution. Because in the CLEARCASE EXPLORER GUI --> Tools --> Add To Source Control -- also fails when that permanent preop TRIGGER is present. The POSTOP Trigger you mentioned is essentially changing the RESERVED to UNRESERVED mode. So, even though people sometime wants to perform RESERVED Checkout will be unable as it will be changed to UNRESERVED due to the POSTOP Trigger. In essence, I want to block for general users any RESERVED checkout while allowing them to perform either "Add To Source Control" or clearfsimport. – user3806728 Apr 07 '15 at 21:43
  • independent of their PC GUI User Preference by using Server Trigger mechanism. Question is how? At least for clearfsimport, I can temporarily perform the action as ADMIN. But how to do that for developers who are always using "Add To Source Control" from the Clearcase Explorer --> Tools menu? – user3806728 Apr 07 '15 at 21:43
  • The postop trigger is to be set just for the duration of the clearfsimport. You remove it after completion. – VonC Apr 07 '15 at 21:51