not able to check out files in snapshot because cleartool error: unable to create a branch request by -mkbranch option in config spec

StackOverflow https://stackoverflow.com/questions/18793096

  •  28-06-2022
  •  | 
  •  

Question

I am not been able to check out file in this specific pc because it compalins abt

cleartool error: type manager "text_file_delta" create_branch operation.
cleartool error: unable to create a branch request by -mkbranch option in config spec.
cleartool error: unable to check out

config_spec:

# ONLY EDIT THIS CONFIG SPEC IN THE INDICATED "CUSTOM" AREAS 
#
# This config spec was automatically generated by the UCM stream
# "space_reload_CA" at 2013-09-06T16:13:58-04:00.
#

# Select checked out versions
element * CHECKEDOUT

element "[03d13482d8a611dc9c17000183b043eb=/space_tff]/.../..." -nocheckout

element "[03d13482d8a611dc9c17000183b043eb=/space_tff]/.../..." -nocheckout

element "[975cd291464411df86be0001843ab215=/space_tff/.../..." .../space_reload_CA/LATEST
element "[975cd291464411df86be0001843ab215=/space_tff/.../..." 
-mkbranch space_reload_CA
element "[975cd291464411df86be0001843ab215=/space_tff/.../..." /main/0 -mkbranch space_reload_CA

end ucm

#UCMCustomElemBegin - DO NOT REMOVE - ADD CUSTOM ELEMENT RULES AFTER THIS LINE
#UCMCustomElemEnd - DO NOT REMOVE - END CUSTOM ELEMENT RULES

# Non-included component backstop rule: no checkouts
element * /main/0 -ucm -nocheckout

#UCMCustomLoadBegin - DO NOT REMOVE - ADD CUSTOM LOAD RULES 


# Component selection rules...
Was it helpful?

Solution

That looks like the IBM article "Element already has a branch of type"

The actual error is:

%>cleartool co -nc a.txt
Created branch "branch" from "a.txt" version "\main\1".
cleartool: Error: Element already has a branch of type "branch" ("\main\branch").
cleartool: Error: Unable to create branch requested by -mkbranch option in config spec.
cleartool: Error: Unable to check out "a.txt".

The cause can be:

rebooting will resolve such type of issue

  • a syntax error issue (cause 3 below)

Syntax errors are usually the cause, except in your cause this is an UCM view, meaning its config spec is automatically generated by ClearCase.

Just to be sure, type:

cd /path/to/your/view
cleartool chstream -generate
cleartool setcs -stream

That will force the config spec of your view to be regenerated according to the configuration of your Stream.

And try again your checkout.


Cause 3:

The error will occur due to a number of config spec syntax problems:

  • Incorrect spelling of scope, pattern, or version-selectors.
    For example CHECKEDOUT or LATEST or label names or branch names
  • Incorrect ordering of the scope, pattern, or version-selector.
    For example forgetting to include a LATEST rule that references a -mkbranch rule.
  • Metadata "types" not created but referenced in config spec.
    For example a -mkbranch rule referencing a branch type that does not exist.
  • A directory is listed using windows style slashes("\" instead "/" ) in Unix/Linux systems

(Note: in a config spec, always use "/": it is easier, and it works both on Windows and Unix.

Solution 3: Fix syntax

Ensure the syntax is correct in the config spec.


Cause 1: time sync issue

This error is caused by the view server and VOB server time not being in sync.

If the time (clock) on the VOB server is greater then the view server this error will happen as the version is created with a time stamp that is seen as in the future by the view server and thus will not be loaded (snapshot view only).

Solution 1: Fix time

Correct the time on the view and VOB server so they are in sync.

Review the operating system instructions on how to modify the system time.


Cause 2 VMware issue

This error can happen when using ClearCase on a VMware® hosted machine.

The cause of the error is related to the time setting on the VMware server. If the time on the VMware server is behind that of the VOB server, then the mkbranch error will occur.

Solution 2: Fix VMware time

Ensure the time on the VMware server is in sync with the VOB server.

The following command is one method that may be used on the VMware server to synchronize the time with that on the VOB server.

net time \\vob_server_name /set 

Cause 4: Replica migration

In one case, the exporting VOB had been moved from one host to another. Instead of following the move procedure outlined in the Administration Guide, the VOB was copied to the new host.
This left the VOB active in two places. One developer created a branch type in the original location. After starting to work with the copied VOB at the new location, the developer detected that the copy did not contain the latest mkbranch operation. The developer decided to run the mkbranch operation again.

The importing site got the synchronization update packet with the first mkbranch event and imported it.

Then the packet with the second mkbranch event arrived but could not be imported because the branch already exists; hence the error.

Solution 4: Fix replica

This is divergence as both replicas, the sending and the receiving site, do not agree on the date and time of the mkbranch event.

One of the replicas will need to be removed and recreated. Which one to remove depends on the size of the replica family, the synchronization pattern in use and the willingness to lose data in that replica.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top