views:

648

answers:

2

I searched and found this question but did not like the answer.

Is there another way to get SVN to ignore config files that are checked in in-place (that you cannot check-in changed), but must be modified on your system.

This is a pretty severe failure of SVN, my first disappointment with the system actually. What I'm hoping for is that someone out there figured out a trick, perhaps with branching just the config files onto a new branch while leaving everything else pointing at the original branch. Perhaps modifying the .svn directory?

There must be a better solution then template/copy, that seems so unmaintainable.

+1  A: 

After messing around for a few hours I think I have an answer. Since it's my own question, I guess I'll make it community wiki...

I created a branch of the entire repository and pointed the "Config" type files at the new branch, then checked them in.

I'm not sure how this will play out, but it made the "Check everything in" stuff work correctly. I think if I change one of those files it'll work fine, checking it into my local repository.

The only thing that could be annoying is if someone else changes a file that I have branched, I'm not sure how I'll identify the fact that I'm supposed to merge.

Bill K
A: 

We get around this by:

All dev machines are consistent. We all develop out of c:\projects\TopGear\trunk... We all alias our SQL server to PROJECTNAME (eg TOPGEAR). We all use the same IIS hostname (TopGearDev)

And our NANT deployment building script rewrites all the config's, as needed, when we do a deployment, so we never need to worry about the settings - all the relevant ones are rewritten.

Added bonus: build servers (we use TeamCity) are trivial to setup.

It's bitten us once or twice, minorly, but has otherwise been good.

Not SVN specific (tho we are using SVN), tho.

Nic Wise
Good point.. Not practical on the project I'm currently working on, but I think I'll push for this in the future. On the other hand, doesn't it make your system a little less flexible? You'd be less likely to be able to move it if, for some reason, you HAD to...
Bill K
All the paths are relative, tho we try to develop out of the same for consistency. the rest mean we can move it to anywhere without a problem.
Nic Wise