can't create clearcase component? - clearcase

I can create ClearCase UCM component from ClearCase project explorer but can't create it through command line.
This is what I have used:
cleartool mkcomp -nc -root /vobs/spider1_pvob/bat1 bat1#/vobs/spider1_pvob
cleartool: Error: Unable to resolve component root directory "/vobs/spider1_pvob/bat1": ClearCase object not found
cleartool: Error: Unable to create component.
What would be the correct command to use for creating this component?

I always create a component in a ClearCase view, using a vob and not a pvob for the root directory.
So in your case, you would need to have:
a dynamic view started
cleartool startview myView
the vob mounted:
cleartool mount /vobs/spider1_vob
that same view set:
cleartool setview myView
(that ways, /vobs reflects the content of the view myView)
Once your view is properly started and set, then you can do
cleartool mkcomp -nc -root /vobs/spider1_vob/bat1 bat1#/vobs/spider1_pvob
Note that I use a vob /vobs/spider1_vob/(bat1) for the root directory, even though the component (which is an UCM metadata) is declared in a pvob: #/vobs/spider1_pvob
See "What are the precautions to be taken while creating a clearcase component?" and "cannot see pvob on clearcase GUI?" for the difference between a pvob and a vob:
The root directory of a component should be in a vob, not a pvob.
A pvob contains the definition of a component.
A vob contains its data (files and directories)
I use a dynamic view here, since the only way for a path starting with /vobs is in Unix, after a cleartool setview.
If you don't set a dynamic view, you can still use it with the full path:
/view/myView/vobs/spide1_vob
(since /view is the mounting point for all the dynamic views)

Related

Cleartool annotate command giving error - Not an object in a vob:"java file"

I am new to clearcase and I am trying to generate a blame file using annotate command, but I am getting the following error :
cleartool: Error: Not an object in a vob: "App.java"
I followed these steps :
Created a view in clearcase explorer
Browsed to the location (C:\test_view)
Ran: cleartool annotate App.java
This resulted in the following -
cleartool: Error: Not an object in a vob: "App.java".
You cannot execute cleartool commands on elements (versioned files or folder) directly in a snapshot root folder like c:\test_View.
You need to edit its config spec:
cd c:\test_View
cleartool edcs
Add selection rules (like at least element * /main/LATEST, unless this is an UCM view, in which case selection rules are already there), and load rules in order to load at least the content of a Vob.
Then you can go within the vob and do some cleartool annotate.
cd c:\test_view\avob
cleartool annotate afile
Note: if your file App.java is not yet versioned, you would need to add it to source control (in any folder in c:\test_view\avob), with cleartool mkelem, or, for multiple files, clearfsimport.
Please create VOBs through create VOB program.
Then create dynamic view using clearcase explorer.
Mount the VOBs on the dynamic view.
Once mounted, in the view explorer, right click and add text file.
rt-click text file to add to source and then checkin the file after making the necessary changes.
from command prompt go to the VOB and run
cleartool annotate
Z:>cd test_tut_element_vob
Z:\test_tut_element_vob>cleartool annotate TestFile.txt
Annotated result written to "TestFile.txt.ann".

Cancel or complete a rebase operation in UCM

I had a dynamic view and I started a re-base operation on that view, then before doing a cleartool rebase -complete I removed that view accidentally!
Now the problem is that I cannot do a rebase -complete or rebase -cancel in another view attached to the same stream.
How can I resolve this issue, I get the following error:
cleartool: Error: No tag in region for view "00000000.00000000.0000.00:00:00:00:00:00".
cleartool: Error: Unable to start view "".
cleartool: Error: Unable to cancel rebase.
With cleartool rebase, you can try and resuming the operation with a new view (which should be attached to the same destination stream)
cleartool rebase -resume -reset -view aNewUCMView
that would be using the option:
-reset -vie/w new-development-view_tag
Resets the target view to a new development view.
Use this option should the target view become inaccessible.
As in "Can't resume or rebase stream on snapshot view on windows":
I would recommend for that new view to be a dynamic one, instead of a snapshot one: it is quicker to start and succeed/fail, and you can do multiple tests without waiting for the view to update itself (update being done only in a snapshot view).
If you see:
cleartool: Error: The view cannot be retargeted because
the current integration activity "rebase.STREAM_NAME.20141124.170858"
has checkouts.
You will have to unco everything (see first "How to find all checkedout files with ClearCase cleartool?"), and then:
cleartool rebase -cancel -reset -view aNewUCMView

cleartool Unable to determine modified elements in "<UUID>" in stream "<stream name>"

I am using ClearCase UCM - Multisite (version 7.x) When I rebase a partcular stream, I get following error.
cleartool Unable to determine modified elements in "<UUID>" in stream "<stream name>"
Advancing to baseline "temp2.6922" of component "cframework_src"
...
Updating rebase view's config spec...
Creating integration activity...
Setting integration activity...
Merging files...
cleartool: Error: Unable to determine modified elements in vob "14828f48.3c1411d6.a3a2.00:01:80:c3:ed:84" in stream "stream_name".
cleartool: Error: Unexpected error in rebase.
cleartool: Error: Unable to perform merge.
cleartool: Error: Unable to perform integration.
cleartool: Error: Unable to rebase stream "<stream_name>".
The magic uid somehow relate to a Vob family uuid-- listed below
Tag: \cframework_src
Global path: \\svr-inh-net-01\ccvobstore2\cframework_src.vbs
Server host: svr-inh-cc-02
Access: public
Mount options:
Region: MGI_WIN
Active: YES
Vob tag replica uuid: 510b4e21.ecef11df.8889.00:01:84:38:25:75
Vob on host: svr-inh-cc-02
Vob server access path: /project/ccvobstore2/cframework_src.vbs
Vob family uuid: 14828f48.3c1411d6.a3a2.00:01:80:c3:ed:84
Vob replica uuid: 510b4e21.ecef11df.8889.00:01:84:38:25:75
Vob registry attributes: replicated
What is the real maning of the error? How can I fix this?
More info
There are other streams which under same pvob. They all work fine.
Sync is complete - no errors - anywhere.
What is puzzling is lack of information in error logs and clearcase logs.
This solution resolved the issue:
canceled the current rebase
After clearing the rebase, issued the following commands against
the branch type:
cleartool checkvob -hlink -f brtype:<stream name>#\***pvob
cleartool checkvob -hlink -f brtype:<stream name>#\childvob
cleartool checkvob -global -acquire -f brtype:<stream name>#\***pvob
This repaired issues with the branch type.
After performing this step, issued "cleartool chstream -generate"
or sycn the stream with the project from the GUI.
This is usually linked to a Vob not declared in the current region, either the \cframework_src itself, or one of its adminVob/PVob (since it is an UCM Vob).
Try a cleartool descr -l vob\cframework_src to see all the linked AdminVob and check if they are registered.
Make also sure it isn't related to right issue when accessing to a specific element (file or directory), by doing a cleartool ls in the destination view (the one where the rebase is in progress).
If it is limited to a specific stream, do a:
cleartool descr -l stream:aStream#\aPVob
Compare its output to the same command for another Stream (which works), in order to check if there is a permission issue (like a "Group NOBODY", because it was created with the wrong CLEARCASE_PRIMARY_GROUP)

cleartool: Error: Checkout disallowed for element "."

I got the error while trying to check out the "." directory in clearcase.
FYI:
view is syncronized with the stream config and all components are modifiable.
The stream has foundation baselines as well as recommended baselines.
The vob is the component of ucm pvob.
cleartool co -nc "."
cleartool: Error: Checkout disallowed for element ".":
the component containing the element or the current stream is read-only
in this project, or the stream lacks foundation baselines.
cleartool: Error: Unable to check out ".".
How would you troubleshoot this error message?
It seems '.' represents the root folder of the vob here.
The vob is the component of ucm pvob.
Make sure you don't checkout a pvob.
You need to checkout the vob of the component (associated to a pvob), not a pvob.
I have seen this message when trying to checkout an element within aVob/lost+found folder.
If that is the case, you need to not select that 'lost+found' directory in the config spec.
element /aVob/lost+found -none
Otherwise:
double-check your component is indeed writable in the project (properties on the project)
make sure your stream knows about that
cleartool chstream -generate stream:a_stream#\a_pvob
make sure the config spec of your view is in sync with the Stream configuration
cd /path/to/your/view
cleartool setcs -stream

What's the syntax to remove a baseline in ClearCase?

It looks like I can remove a just created baseline from ClearCase UCM with a simple command:
$ cleartool rmbl p_xxx_main_2_0_3_1
but this gives me the error:
cleartool: Error: Unable to find baseline "p_xxx_main_2_0_3_1".
cleartool: Error: Unable to remove baseline "p_xxx_main_2_0_3_1".
I can list the baselines:
$ cleartool lsbl -s
p_xxx_main_2_0_3_1.1465
p_xxx_main_2_0_3_1
I'm running this operations in the stream snapshot view. It looks like I need to specify more info. How should I specify the baseline?
You should at least specify the pvob (UCM Project Vob where the baseline is defined):
cleartool rmbl p_xxx_main_2_0_3_1#/vobs/apvob
If you don't know the pvob of the baseline, it is the same than the one of the Stream where your UCM view is currently attached to.
And you can get the Stream of your view by typing (anywhere within said view):
cleartool lsstream -cview

Resources