I'd like it so when I check out a file no one else can edit it until I check it back in. Is there a version control system that allows me to do this? I currently use Subversion and I know it has the 'lock' feature but I want it to do that automatically without me having to request it on each file I'm working on.
views:
107answers:
7There are lots of them.
Source Safe is notorious for not working any other way.
Serena Dimensions can be configured that way.
TFS will allow you to do an exclusive checkout.
Most source control systems will allow you to do this, some are built that way, other have the functionality in case it is needed.
However, if you are working in a team, doing this will only hurt progress. Being able to have many people work on the same file at one time is not only a time saver but is more efficient use of resources and speeds work along. You should only use exclusive lock in special circumstances, where you really can't have anyone else work on the file.
CVS
Clearcase
--
Typically modern VCSs seem to deprecate the lock model of development, preferring a merge model.
edit: SVN merging is - in my opinion - broken. Once you've used ClearCase/Mercurial/git merging... you'll learn that fast. :)
You can do it in subversion. I'd recommend that you dont and instead learn how to merge. Here's some more information:
http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
The old IBM "CMVC" tool works that way, I think. It makes me feel uncomfortable and vaguely sad to think about that however.
RCS uses locks as the main approach to managing edits. You check out the file, and if you intend to edit it, you lock it. You can force an override on someone else's lock, but if you do, you clobber their changes. See for example this best-practices discussion for more info.