My situation is this: I have a Subversion server set up at my home, and we also use Subversion at the company where I work.
At work, we use the lock/edit/unlock model (mainly because we are transitioning from Visual SourceSafe and it’s easier for the moment). At the moment this is achieved by setting the ‘needs-lock’ property on all added files (using the auto-props section of the SVN client config file on each client machine).
However, I don’t want to use this model for my home SVN server (I prefer the edit/merge/commit way of working), so currently after I commit anything from my work PC to my home server, I have to manually remove the needs-lock property from any files I have added.
Is there a way I can set up the SVN client to only apply this property to files committed to a particular server? Or am I going about it the wrong way: should I be using hooks on the work server to add this property, instead of the client?
Any help or advice is much appreciated.
EDIT: Apparently, you cannot do this on the server (or at least it’s extremely strongly recommended that you don’t).
The subversion autoprops feature is configured in the config file of your SVN client. There is also a separate servers configuration file that supports server-specific settings, but unfortunately you cannot override autoprops there.
I suggest you make two versions of config: config.home and config.work. Then write a shell script (e.g. a .bat file) that copies one of those over config. That should allow you to switch quickly and easily between both configurations.