tags:

views:

429

answers:

2

I am working on a large web project which is managed in an SVN repository.

Each time a team member checks out the project, or we check out the project on a new production server, we have to modify a custom configuration file for that server. I have a "config.ini.base" file under revision control, which we keep updated with the latest settings, the idea being that team members copy that to create their "config.ini" (which is listed under 'ignore' on the directory).

To avoid confusion and mistakes, I'd like to somehow block any changes to "config.ini.base" from being committed to the repository, unless it is committed explicitly or the read-only setting is somehow explicitly overridden. How would I do this?

+3  A: 

svn lock

Also, worth a read is Advanced Locking

Trevor
You could also set the `svn:needs-lock` attribute, which would make the file read-only in all working copies, and alert users that they need to get a lock before changing it.
Craig McQueen
+2  A: 

As Trevor and Craig have said, the way to do is with SVN's locking capabilities.

Setting svn:needs-lock on a file will make it read-only unless the user has locked the file.

Here is a link to the most recent documentation (the other links are out of date).

Michael Hackner