Search code examples
version-controlclearcaseadministrationcheckinvcs-checkout

ClearCase: What is the difference between master and current replica?


I'm new at ClearCase and one of the file's master is not me. So, I can make check-out but cannot make check-in.

I was expecting that if I'm not master I cannot check-out even. It should be read only for me.

If I can check-out but unable to check-in it confuse me.

Can you please describe the difference between master and current replica and how can I reach to master replica.


Solution

  • See cleartool checkout man page

    If the VOB that contains the element is replicated, and synchronous request for mastership (SRFM) is not enabled, then the checkout command fails if you try to check out a branch mastered by a remote replica.

    cleartool checkout –nc file1.txt
    cleartool: Error: Unable to perform operation "checkout" in replica
    "lexington" of VOB "/vobs/dev".
    cleartool: Error: Master replica of branch "/main" is "london".
    cleartool: Error: Unable to check out "file1.txt".
    

    In this case, if you need to work on a branch mastered by another replica, you can

    • Request mastership of the branch and wait until the mastership is transferred to your local replica before you check out the branch.
    • Check out the branch and do your work while waiting for mastership to be transferred.
      You can request mastership before or after checking out the branch. To check out the branch, use checkout –unreserved –nmaster, which performs a nonmastered checkout.
      When the mastership of the branch is transferred to your current replica, you may have to perform a merge before checking in your work. Therefore, do not use this option if you cannot merge versions of the element (for example, if the versions are in binary format).

    So if you can checkout, maybe you did checkout the branch first.
    See more at "About sharing control of a branch with developers at other sites".