Reputation: 9552
I work from several different locations on the same project and I use SVN to checkout wherever I happen to be working. I have a settings file that needs one line changed depending on where I'm working, but otherwise, it's a relatively static file. It's a bit annoying when every commit the file is just switching that one line back and forth depending on where I work.
Is there an easy way to manage this? At the least, I'd like to know of a way to exclude the file from commits even if it's modified. It would be great if it's possible to checkout a different version of the file depending on where I am.
Upvotes: 2
Views: 96
Reputation: 376002
If you add your configuration file to the svn:ignore property, then it won't be committed when modified:
svn pe svn:ignore .
The best way to manage this is to organize your config files so that the common stuff is in one file, checked in to svn, and the line that has to flip per machine is in its own file, included into the main config file. Then that local config file is added to svn:ignore.
Upvotes: 0
Reputation: 40319
You could manage it with some kind of branch structure, I believe.
Upvotes: 0
Reputation: 994619
The usual way to manage this is to remove your (making up a name here) settings.cfg
file from Subversion, and check in a settings.cfg.example
file instead. On each machine, you would copy settings.cfg.example
to settings.cfg
and edit as necessary. For changes to the structure of the config file or to default settings or whatever, edit settings.cfg.example
.
Upvotes: 1