1

The svn:ignore property ignores files that aren't under source control, so they don't come up in svn status with a ? (they don't come up at all, and are ignored also if you do an add)

But what if I want to ignore a file that is under source control? svn:ignore won't ignore it.
For example, what I want to do is set a configuration file, add it to svn, so it's there when the system has to be deployed on a test or live server (it's a web app) but for local environment development, I need to modify the config file to set it up with my local settings.

But I don't want this updates to be commited, so, how can I do?

svn delete will just remove them from the repository and when doing a svn update on the test server, it will delete the config file, that's not what I want.

Petruza
  • 11,744
  • 25
  • 84
  • 136
  • SVN is no deploy system, it's a source control system. There are very nice tools for making and checking distributions (such as `automake`); use them and your problem goes away. – thiton Feb 15 '12 at 16:07

3 Answers3

1

One way woul be to use svn:externals. You would link to a path that contains the config file. On the Buildserver you could check out with the option "--ignore-externals".

Anyway I usually just delete the file in the buildscript. Not very elegant but does the job.

Mathias F
  • 15,906
  • 22
  • 89
  • 159
1

Unfortunately, this isn't all that easily done in svn. The closest I've seen is in the accepted answer to this question but it means you have to put your other files into changelists also. Unfortunately, some svn IDE plugins (subversive I'm looking at you!) don't appear to have good support for changelists.

Community
  • 1
  • 1
digitaljoel
  • 26,265
  • 15
  • 89
  • 115
1

The file that is not meant to be committed when changed (like configuration file) should be treated as template file with name reflecting this treatment. Append for instance ".template" to the file name, and have a default contents of the file in repository. After checking out the working copy every user must manually copy this file to a working version (without ".template" extension), and optionally change the contents. This working file must not be added to repository (some server side pre-commit-hook script with svnlook command can make sure of that).

The problem arises if this template file is changed. Every user must respond to this change (maybe doing nothing, but maybe changing their working file). There are ways to automatically alert the users about template change (with user side post-update-hook script), but this is maybe just overkill. When someone changes the template it should just notify all other about the change, and that's it.

Dialecticus
  • 16,400
  • 7
  • 43
  • 103