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?
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.
Related
How to search all archived file that exceeds 100MB in a particular BASE Clearcase VOB. In Unix file system, it is easy:
find . -type f -size +104857600c -exec ls -la {} \;
Would it be possible to search directly in the folder of the VOB in the file system without create a Clearcase view and modify the config spec?
If I have to create a Clearcase view, would it be possible to use the cleartool command find to search in the whole VOB.
As mentioned in this technote:
At present there is no size option available with the cleartool find command.
The decision was made by Product Management to exclude the requested feature from future upgrades and releases due to the significant architectural changes required to implement the solution.
So creating a view remains mandatory.
And you can either directly use the ClearCase Explorer:
Or use your regular Linux command in a dynamic view:
# find . -size +20480c -print
./vendor/Common/NT/work/toolset/make/cal.output
./vendor/Common/NT/work/toolset/make/paf.output
would it be possible to use the cleartool command find to search in the whole VOB.
"The whole VOB" as in "all possible versions"... not really, unless you try and find files in the extended pathnames of an MVFS dynamic view. I haven't tested that option so.
I'm sure I was able to pop up the ClearCase Activity Properties window from the command line at one point.
Does anybody how to make this happen?
Thanks!
This might be one of the executable in <IBM/Rational/ClearCase>/bin, but you can also try (using cleartool describe):
cleartool descr -graph activity:myActivity#\myPVob
Otherwise clearprojexp.exe launched the UCM project manager itself.
Once you label file versions in a release, ideally you want to protect that code from inadvertant removal (please read everything before commenting). It is too easy to delete the code.
I know I can lock the label but the file versions attached to the label don't get automatically locked (you would have to create a perl script to do that?). You can lock an element but not an element version. Furthermore, once you lock an element, you can't check it out!!!!! STUPID. This stops future development! All I want to do is protect the code I developed (without copying it elsewhere for archive). A repository should protect the code you develop.
Of course, there is the protect command but that doesn't work in snapshot / web views.
Again, ideally you would want to lock all the element-versions in a release but still be able to continue development. The lack of this feature seems to be a gross oversight.
Any ideas? (if you have any perl scripts, please post)
It is too easy to delete the code.
It shouldn't be: the only way you will be removing that labelled version from a ClearCase VOB is through destructive commands like cleartool rmelem or cleartool rmver.
All you need to do is to have a (preop) trigger in place denying those commands for everybody (except a ClearCase admin).
Something along the lines of:
cleartool mktrtype -nc -all -ele -pre rmelem -nusers $nusers -exec \"$perl_cmd -e exit(1)\" NO_RMELEM\aim"
I would still recommend to lock the label anyway, in order to make sure it isn't moved to another version.
As in:
ct lock -nusers vobadm lbtype:FOO_LABEL#vob:/vobs/admin
But again, if rmver is denied, your (labelled) code is safe.
Actually, the OP was talking about rmname (the DEL) in ClearCase Explorer.
The fear is that if a file is deleted, and a label is moved, then one could ignore for a long time the deletion.
BUT a label should never be moved:
the label from a ClearCase UCM baseline is immutable (you cannot move it)
a label in base ClearCase should always be locked
I cannot see pvob on clearcase GUI but when I list the vobs in command line (cleartool lsvob -s), I can see it.
In order to make it visible on the clearcase GUI, what are the necessary steps should I take?
Also it looks like a private Pvob, how can I make it public?
The Pvobs are visible in the ClearCase Project Explorer (type clearprojexp), not in the ClearCase Explorer ('clearexplorer').
The pvob could be used as a vob, but it normally is used only as a referential for UCM metadata (projects, streams, activities...), and not for data (files/directories).
It is an Admin vob for other (data) vobs, which explains why you don't see it in the ClearCase explorer.
For your second question, you need to use the cleartool mkvob command:
UNIX, Linux, and Windows: Private-to-public VOB conversion
To convert a private VOB to a public VOB, use a command like this:
cleartool mktag -vob -tag \vob3.p -replace -public \\saturn\users\vbstore\private3.vbs
This replaces the VOB's private VOB tag with a public one.
mktag prompts you to enter the VOB tag password.
I want to checkout some files from a batch script, but since we use UCM checking out files needs to be associated with an activity. Is there an easy way to show the GUI for creating/selecting an activity to associate the checkout with?
You can pop up the dialogue by using the cleardlg program with arguments /checkout .
You can simply ask for an activity name in your script, and then use the cleartool setactivity command
cleartool sectact -view viewTag -none # make sure to unset any previous activity
cleartool sectact -view viewTag newActivity # set the new activity (name#\pvob)
You can launch the ClearCase Project Explorer (UCM GUI) with clearprojexp, but I don't think a "UCM activity dialog box" is available as a separate executable.