Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

CVS: How prevent files and modules being check-out 2 times

CVS: How prevent files and modules being check-out 2 times

CVS: How prevent files and modules being check-out 2 times

ClearCase is good, when a developer check out a file to modify, no one else can check it out agian. This way, no conflict will occur.

However, when I come to use CVS, everybody can check out a file, a module at the same time and anytime regardless it being checkout or not. Boy, this way, how can I avoid the conflict when people working on the same file.

Any suggestion appreciated.


RE: CVS: How prevent files and modules being check-out 2 times

Hi Trevor,

CVS is called CVS (Concurrent Versioning System) because it is meant to enable developers to work on the same file at the same time, not to stop that from happening. So it will never stop you from editing the same file while someone else is modifying it.

There are several ways to work around it though, and they are somewhat documented in the help file. The way we are using: Check out the whole module as READONLY, and after that do a "reserved edit" before you modify a file. You can type in the command "cvs -z9 edit -c <fileName>" or just a push of a button if using WinCVS. If someone has done a reserved edit on that file before you, then a warning message will be displayed and the readonly attribute will still be on, and you won't be able to modify that file. Then after you are done with it, just commit or unedit (to abandon the changes), and the readonly lock will be on again.

But then it would mean your developers will need to remember to reserve edit the file everytime they want to edit it.

Hope it helps,


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close