Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
420 views
in Technique[技术] by (71.8m points)

clearcase - What is the difference between a reserved checkout and an unreserved checkout?

When I check out a file in ClearCase it asks me if I want to check out the file "Reserved" or "Unreserved". What are the differences between these types of checkouts and when are the appropriate times to use them?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

As mentioned in "What are the basic clearcase concepts every developer should know?", ClearCase support a locking mechanism which is both:

  • "pessimistic": reserved checkout doesn't actually prevent other people to do their own checkout, but they will have to wait for the person who has the file checked out as "reserved" to do the check in: nobody can check-in until that person does the first check-in (then each other user will have to merge his/her version with the latest checked-in file)
    Note: a "reserved" checkout can release its lock and be made unreserved, either by the owner or the administrator;

  • "optimistic": unreserved checkout which means (if nobody use a reserved checkout on the same file): the first one to check-in can do it without any other operation, the other ones will have to merge their work with the latest checked-in file.

In term if usage policy:

  • Usually, reserved checkout is fine since it allows you to make your changes with a "high prioritization": they have to be taken into account first.
  • For local modifications which don't have to be checked-in right away, an unreserved checkout is enough.
  • For local modification which don't have to be checked-in at all, hijacked file or eclipsed files are enough (so, no checkout at all)

Notes:

A cleartool checkout/checkin is not the same as:

  • svn checkout/git checkout, which are updating a working repository with the content of a revision/commit, as opposed to checkout a version of a file: set of files vs. one file.
  • "checkin": svn commit/git commit which registered changes of possibly multiple files to the repo (remote for SVN, local for Git), as opposed to creating a new version for one file.

Git itself would not have "file locking" (reserved checkout). Only system using Git might offer that feature, like Git LFS.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...