subversion tip

Courtenay : March 6th, 2007

If your project contains svn:ignores for files like *.tmproj or other junk files created by your IDE or editor, then you need to move those ignores to your global subversion configuration (non-windows only). This is because, on a project, you may have four different developers littering the project with their own project-file ignores, and the app’s repository really isn’t the place.

Since a bunch of people in #caboose hadn’t seen this file, I thought it prudent to mention here.

Open up ~/.subversion/config and marvel at the options, then scroll down to about line 54 where it starts, “global-ignores”. Mine looks like this. It includes some logs, the database.yml file, and some AFP junk files.

global-ignores = ._* *.log *.html-gzip-* mongrel_log database.yml *.rej .AppleDouble .DS_Store

Once a file is in here, svn st will never see it again.

6 Responses to “subversion tip”

  1. Pazu Says:

    The subversion configuration file is available on Windows as well. It’s stored in the %APPDATA%\Subversion folder (%APPDATA% is usually C:\Documents and Settings\<your>\Application Data).

  2. Thomas Says:

    Good advice, however, there are cases where svn:ignores do belong in the project repository. For instance, you list the log files and database.yml in your global config, however, it’s safe to say that those files should never be checked in, so it’s usually better to go ahead and make sure there is a svn:ignore set up for them. Especially when you’re working with distributed teams or with junior developers (or even senior devs – they make mistakes occasionally, too ;~).

  3. atmos Says:

    Pimp, thx, woot!

  4. Henry Turner Says:

    Where is ~/.subversion/config? I don’t have that locally on my computer and I’m on a Mac also.

    Thanks.

  5. nicholas a. evans Says:

    I would have to strongly agree with Thomas. svn:ignore properties aren’t “littering the project” when they can be used to communicate shared concerns or when they are specific to a certain project stucture.

    I personally only use global ignores for ignoring files that are specific to a particular developer (for example *.swp for vim swap files). If it’s a file that every developer can be expected to generate but should never check in, then I believe it should be in the svn:ignore property.

    But, to each their own.

  6. Disabled Says:

    sdfsadfsadfsadf http://clanlasombra.jino-net.ru

Sorry, comments are closed for this article.