IBM Support

Error creating a new element when the parent directory can not be checked out due to branch mastership issues: Can't modify directory "." because it is not checked out

Technote (troubleshooting)


Problem(Abstract)

This technote explains why attempts to create a new IBM® Rational® ClearCase® element fails when the parent directory can not be checked out because the local site does not master the branch type.

Symptom

Attempts to create a new element when the parent directory can not be checked out because the local site does not master the branch type listed in the config_specs -mkbranch rule results in the following error:

M:\view2\vob1>cleartool mkelem test.txt -master
cleartool: Error: Can't modify directory "." because it is not checked out.


M:\view2\vob1>cleartool co -nc -unreserved -nmaster .
cleartool: Error: Unable to perform operation "make branch" in replica "original" of VOB "\vob1".
cleartool: Error: Master replica of branch type "br1" is "rep1".
cleartool: Error: Unable to check out ".".

Note: Attempts to checkout a file element to a branch that is not mastered by the local site will result in the same error.

Cause


The cause of this error relates to the current view's config_spec; it may have a -mkbranch rule or use an existing branch name for a branch type that is not mastered at the local site.

If the parent directory can't be checked out on the non-mastered branch, then new elements can't be created in that directory.


This may be preventing the checkout of the parent directory where the branch doesn't already exist and the local site does not master the branch type that needs to be created (-mkbranch br1 rule argument in the config_spec.)

Example:

M:\view2\vob1>cleartool catcs
element * CHECKEDOUT
element * .../br1/LATEST
element * /main/LATEST -mkbranch br1

M:\view2\vob1>cleartool lsvtree .@@
.@@\main
.@@\main\0 (REL1)
...
.@@\main\75


Resolving the problem


Have the site that masters the branch type create an instance of the branch on the parent directory if it doesn't already exist.

Then the new element can be created.

For example:

  1. The site that masters the branch type creates a branch instance on the parent directory.

    Note: The version tree should look similar to the following:

    M:\view2\vob1>cleartool lsvtree .@@
    .@@\main
    .@@\main\0 (REL1)
    ...
    .@@\main\75
    .@@\main\br1
    .@@\main\br1\0


  2. Create a synchronization packet from the mastering site using multitool syncreplica -export so the site where the element creation is going to happen receives the mkbranch operation.

  3. The local site then checks out the parent directory with -unreserved -nmastered (because there is now an instance of the branch) and creates the new element.

    M:\view2\vob1>cleartool co -nc -unreserved -nmaster .
    Checked out "." from version "\main\br1\0".

    M:\view2\vob1>cleartool mkelem -nc -master test.txt
    Created element "test.txt" (type "text_file").
    Created branch "br1" from "test.txt" version "\main\0".
    Note: Branch "br1" explicitly mastered by replica "original".
    Branch type "br1" mastered by replica "rep1".
    Checked out "test.txt" from version "\main\br1\0".

Refer to technote 118471 Creating an element in a replica that does not master branch type main for additional solutions.


Document information

More support for: Rational ClearCase
Mastership

Software version: 7.0, 7.0.1, 2003.06.00, 2003.06.16

Operating system(s): AIX, HP-UX, Linux, Solaris, Windows

Reference #: 1142784

Modified date: 13 October 2009