2

Is there a way to make cleartool checkouts unreserved by default? Perhaps a ~/.cleartool file or some environment variable? I understand the default can be set on the VOB (or all VOBs), but that option is beyond my control.

The ClearCase version I'm using is:

$ ct -version ClearCase version 7.0.1 (Wed May 30 17:04:58 EDT 2007)
7.0.1.0-RATL-RCC-IFIX01 (Wed Sep 19 16:08:10 EDT 2007) @(#) MVFS version
7.0.1.0-IFIX01 (Thu Sep  6 20:09:08 2007) built at $Date: 2009-12-08.14:59:16 (UTC) $ cleartool 
7.0.1.0-IFIX01 (Thu Aug  9 20:20:45 EDT 2007) db_server                   
7.0.1.0-IFIX01 (Fri Sep 14 20:23:09 EDT 2007) VOB database schema version:    54

You may ask "why in world would the default ever be set to -reserved?" A fair question. However, the matter is beyond my control.

Update: I neglected to mention the environment is Linux.

David J. Liszewski
  • 10,959
  • 6
  • 44
  • 57
  • 1
    cleartool unreserved checkouts are useless. This isn't subversion. When you update your view, your checkouted files won't update. So you have a broken build that you can just fix by commiting. Since the commits aren't atomic, now half your files will be commited, you've broken the build for everybody and you still have to merge your file. Welcome to Hell. The only suitable solution is to use UCM and have one stream per developer. – neves Aug 23 '11 at 18:16
  • @neves Good point. Thankfully I'm no longer in the position of being subjected to `ClearCase`. – David J. Liszewski Oct 03 '12 at 04:30
  • 1
    BTW, you can also just use hijacked files. I'm just using hijacked files now. – neves Oct 10 '12 at 18:49

3 Answers3

3

In the ClearCase Explorer, menu:

Tool / Options / button ClearCase Options / Tab "Operations"

Unchecked "reserved" in the "Check out" section.

However, this is for one user, not a global setting for all users...

On Windows, this is stored in the registry at:

HKEY_CURRENT_USER\Software\Atria\ClearCase\CurrentVersion\Checkout

key:

Reserved 0

So if you can add that as a post-install setting, you could generalize that behavior to all users using your custom setup.

alt text http://www-01.ibm.com/support/docview.wss?uid=swg21135939&aid=2

See also this IBM technote.


The OP unhillbilly comments rightly about the command cleartool unres (unreserve), which:

changes the checkout status of a checked-out version of an element to unreserved.
A temporary unreserve checkout of version event record is written to the VOB database.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks much VonC. I'll accept even though it doesn't help my situation on *nix -- I neglected to mention in my question that I was using RHEL. – David J. Liszewski Feb 08 '10 at 16:33
  • @cruelfate: I do ClearCase on Unix (Linux or Solaris) as well. I will find you the right conf file tomorrow. – VonC Feb 08 '10 at 17:41
  • 1
    @cruelfate: after investigation, it appears the simplest solution (for Linux/Unix) would be to define an alias (`alias co cleartool checkout --unreserved`) in order to achieve what you want. Not exactly ideal though. – VonC Feb 09 '10 at 09:31
  • @VonC - Heh. I was going to post that as answer too. :-) Thanks. – David J. Liszewski Feb 10 '10 at 13:10
  • I found there is a command, `cleartool unres` which will change given element(s) from reserved to unreserved. – David J. Liszewski Nov 03 '10 at 19:54
  • @unhillbilly: right!, I have included that command in the answer. – VonC Nov 03 '10 at 19:58
3

I know this is an old post, but in case anyone in the future comes along with the same question, here's my answer.

If you want to set up a trigger so that everyone performs UNRESERVED checkouts then use the following command:

cleartool mktrtype -element -all -post checkout -exec '/opt/rational/clearcase/bin/cleartool unreserve -nc '$CLEARCASE_PN' TRIGGERNAME
Sternerson
  • 155
  • 1
  • 7
Will
  • 41
  • 1
0

The command I posed above should have another single quote so that it is '$CLEARCASE_PN' TRIGGERNAME

Will
  • 41
  • 1