Unable to connect to VOB,getting i/o eror - clearcase

How to avoid the following error message:
ldndss02432$ cleartool setview dheeraj_unix_view2
ldndss02432$ bash
ldndss02432$ cleartool catcs
element * CHECKEDOUT
element * /main/LATEST
ldndss02432$ cd /vobs/fo_ird_steed
bash: cd: /vobs/fo_ird_steed: I/O error
ldndss02432$

Simply do not use cleartool setview (it brings only troubles)
Use the full path of the view:
cleartool dheeraj_unix_view2
cd /view/dheeraj_unix_view2/vobs/yourVob

The vob was untagged. Tagging it resolved the issue.

Related

Clearcase findmerge producing no output

I am trying to merge my development branch with the parent branch to the one I am working in. I do not have graphical ClearCase, I only have the command line. I am using Solaris-10.
When I do lsvtree on the file, the last 3 results I see are:
filename##/main/release2/10 (PROD_REL2.0, PROD_REL2.1, PROD_REL2.2, ...)
filename##/main/release2/myprivateview
filename##/main/release3/myprivateview/1
When I do a describe on the file, I get:
version "filename/##/main/release3/myprivateview/1"
...
predecessor version: /main/release3/myprivateview/0
I want to merge my changes into the main branch so that other users can see my changes.
I have tried :
cleartool findmerge -all -fver /main/release2/LATEST -print
cleartool findmerge -all -fver /main/release2/10 -print
cleartool findmerge filename -fver /main/release2/LATEST -print
cleartool findmerge filename -fver /main/release2/myprivateview/0 -print
and various other combinations.
What happens is it thinks for awhile and then prints...nothing. No error messages, nor listing of merges, nor conflicts, nothing at all gets printed.
I have checked that my view is dynamic. What am I doing wrong?
Whenever you do a merge or findmerge, you need to do so in a view set to reflect the destination branch (here the main branch, which seems to be for you release3)
So setup another dynamic view, used for the merge, with:
element * CHECKEDOUT
element * .../release3/LATEST
element * /main/0 -mkbranch release3
element * /main/LATEST -mkbranch release3
Here, release3 would be the destination branch, that is the branch you are merging to.
In that view, try your findmerge command again.
Note that, as I explained here, you would need to findmerge (and merge) your folders first, then your files.
Thank you #VonC for your advice.
I could not figure out how to create a new view with the config specs you mentioned above.
However I discovered that there is no need to create any new views at all: All I had to do was change my own view to point to the branch level that I wanted to change.
What I did is:
1) $ cleartool edcs
2) save the config specs that were displayed somewhere else
3) edit the file to look like this:
element * CHECKEDOUT
element * .../release3/LATEST
element * /main/LATEST -mkbranch release3
4) $ exit (to reload the view with the new config specs, not sure if this was necessary)
5) $ cleartool setview myprivateview
6) $ cleartool findmerge filename -fver /main/release3/myprivateview/1 -print
7) $ cleartool findmerge filename -fver /main/release3/myprivateview/1 -merge
8) cleartool ci filename
9) cleartool edcs
10) replace config specs as they were before`
This performed the merge exactly how I wanted and these steps will work to merge into any level, without having to create any views.

How to apply a private label with mklabel celearcase command?

I'm tring to apply a personal label on a file in clearcase vob.
I've used the command:
cleartool mklabel MY_LABEL TestFile.txt##\main\1
End the result is:
cleartool: Error: label type "MY_LABEL" not found in VOB "\TEST_vob"
and no global type defin cleartool: Error: Unable to create label
"MY_LABEL" on "TestFile.txt" version "\main\1".
I execute the command from command line in the same level of the file.
Am I using the command incorrectly, or is the command locked by a CC admin?
You should create the label type first using the cleartool mklbtype command
M:\myView\TEST_vob\aFolder> cleartool mklbtype -nc MY_LABEL
Created label type 'MY_LABEL'.
Then try your mklabel command again.

Error in clearecase wile checking out a file

I have an issue with ClearCase I was trying to check out a file from the dir by using ct co -nc file name, but I am getting the following error:
cleartool: Error: branch type "test1" not found in VOB "/dir/file" and no global type definition can be found.
cleartool: Error: Unable to create branch requested by -mkbranch option in config spec.
cleartool: Error: Unable to check out "file".
But when I was trying to check out another file from dir I am able to do them. I am only getting the problem to check out that file.
Can anyone help me how can I overcome this error?
This looks like a config spec using a branch named "test1" in a selection rule (element ... -mkbranch test1) which was not created first.
So first, check what the config spec looks like:
cleartool catcs
See also what the config spec are for the files in the parent folder of that file:
cd /path/to/§parent/folder
cleartool ls
See if using cleartool mkbrtype would help:
cleartool mkbrtype -c "test1 branch" test1#/vobs/avob
(I use the Unix syntax, judging from your previous config spec)
Looks like "test1" branch type does not exist in the vob.
Create a branch using ct mkbrtype. Run the following command form the folder where file is present
ct mkbrtype -nc test1
As the error is occurring only for one file, the config spec should have selection rule only for that file. Can check this using
ct catcs
Note:- When adding a branch rule in config spec, Always check the brtype exists with that name.

cleartool rmelem "has checkout"

I have a new branch in which I would like to remove some files. I was able to remove some files with this commands:
cleartool co -nc .
cleartool rmname <filename>
cleartool ci -nc .
But for some other files I get this error:
$ ct rmname file
cleartool: Error: Element "file" has checkouts.
In my branch, in my view, these files are not checked out. However I can find some checkout with ct lsco file in other branches.
Why do I get an error. Removing a file from my branch shouldn't affect the other branches, right?
Can I force the command with -f ?
You could try the -force option for the cleartool rmname command, to get past the fact there are other versions checked out. But that -force option might not be available (depending on the cleartool version)
I have seen that option in "Cleartool removing a checkedout file from a folder with rmname" for rmname.
If rmname -f works, then it is the way to proceed.
That error message is more about warning the users that, while the file won't be visible anymore, it is still being modified elsewhere.

how to find out all the checked out files in a branch

As title, could anyone of you give me a working instruction to solve that problem ?
thanks a lot!
If you only after checked-out files and you are in a dynamic view set to see only MY_BRANCH:
ct lsprivate -co .
(with '.' being the parent directory under which you want to find co files)
That command is recursive by default.
Your config spec would need to be
element * CHECKEDOUT
element * .../MY_BRANCH/LATEST
element -directory /main/LATEST
With checked-out files and directories in a snapshot or dynamic view, use indeed lsco, but knowing that command is not recursive by default. So I would recommend:
ct lsco -rec -brtype MY_BRANCH
$ ct lsco -brtype your-branch-type-selector
Start by having a look here : IBM ClearCase Command Reference : lscheckout
Then, as an example, try this...
If your branch was foo, and your are in the VOB you want to check, you can run
ct lsco -brtype foo
or
ct lsco -brtype brtype:foo

Resources