views:

237

answers:

2

Guys, I am seeting up Apache server with TortoiseSVN for local source code repository. Currently on trial purpose I am setting only two users. Is it possible for administrator to set up some thing so that file get compulsory locked once its checkout (copy to working directory) by some one.

Abhijit Dhopate

A: 

Wouldn't that defeat one of the purposes of a concurrent versioning system like SubVersion? Generally, you'll check out a block of files, but the server doesn't know whether anyone is editing those files. Why not allow another user access to those files and deal with the results if a conflict emerges?

Steve Moyer
+2  A: 

The main reason you might want to do this on subversion is for binary files (i.e. images, etc.) that are difficult or impossible to 'merge'. In those cases, each user can request a lock on a file. There is also a svn property (needs-lock) that can be applied to files that makes them read-only on checkout, and read-write when you lock, so that you remember to request the lock before editing.

See the chapter on locking in the svn book.

SteveDonie