How to make check-outs be unreserved by default using ClearCase command line tools

我是研究僧i 提交于 2019-12-24 05:39:09

问题


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.


回答1:


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.




回答2:


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



回答3:


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



来源:https://stackoverflow.com/questions/2210499/how-to-make-check-outs-be-unreserved-by-default-using-clearcase-command-line-too

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!