Subversion management of project configuration files

configuration, configuration-files, configuration-management, svn, version-control

Solution

I don't know if this is a "best practice" but this is how I handle this and it works very well. I have several apps and they each have a separate config file for their production, staging and dev environments. The configs are named web.config, stage.config and dev.config. All three are kept under version control. The app expects and uses web.config to retrive configuration settings. As part of our NANT build and deployment scripts called by cruise control, depending on the environment being deployed to, the appropriate config is renamed to web.config and deployed.

Hope this helps.

Problem

What is best practice for using subversion (SVN) for managing a project that requires a single configuration file that has multiple concurrent versions for different environments. I.e. - Project ABC is used for three different environments, that use the same code, except for a slightly modified configuration file. AND - Project ABC is also developed by multiple developers, using a slightly modified configuration file for each developer. I am aware that a configuration file template and svn:ignore could be used, but was wondering if anyone could describe best practice for this approach, and/or any other suitable alternatives. Thanks in advance! M.

Original source