Subversion management of project configuration files

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.

Ie

  • 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.


    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.


    Keeping multiple files in source control can be tricky. We use a home brew configuration tool that reads a system environment variable and from that reads a matching config file and then modifies a shared configuration file. I can't say it's a great solution, but it works.


    For years, and many different, successful projects, I just don't version the system or developer specific config file. Sometimes it is just database access info, or a few vital paths or whatever. Narrow it down to as little as possible. Don't feel bad about not versioning that info. This has been done with every number between 2 and 5 developers on several projects and it has never caused confusion, problems or debate on real world projects.

    链接地址: http://www.djcxy.com/p/43290.html

    上一篇: 嵌入式工作流/ BPM库的Python?

    下一篇: 项目配置文件的Subversion管理