SVN Client Configuration File

This file describes SVN client behavior. Most interesting part of this file is {{\[auto-props\]}} section, which lists what properties will be _automatically_ assigned to configured file types when files are _initially_ added into the repository.

Files which were added into the repository without correctly set properties usually will end up with wrong line endings, or unexpanded keywords (such as $Id$), or won't be executable when they should be (for .sh scripts). To fix such files, use svn from command line:

# for non executable files
svn propdel svn:executable ''filename''
# for text files
svn propset svn:eol-style native ''filename''
svn propset svn:keywords Id ''filename''

To avoid such issues in the future, it is recommended for all Cocoon committers to have following config. Usually this config file is found in ~/.subversion/config, at least on *NIX and Cygwin platforms. In case of TortoiseSVN, go into the TortoiseSVN menu, Settings, General, Subversion Configuration File, Edit button.

# [auth]
# store-auth-creds = no

# [helpers]
# editor-cmd = editor (vi, emacs, notepad, etc.)
# diff-cmd = diff_program (diff, gdiff, etc.)
# diff3-cmd = diff3_program (diff3, gdiff3, etc.)
# diff3-has-program-arg = [true | false]

# [tunnels]
# ssh = $SVN_SSH ssh
# rsh = rsh
# rsh = /path/to/rsh -l myusername

[miscellany]
# global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store
# log-encoding = latin1
# use-commit-times = yes
enable-auto-props = yes

[auto-props]
# Scripts
*.sh  = svn:eol-style=native;svn:executable
*.bat = svn:eol-style=CRLF;svn:executable
# Text files, Source code
*.java = svn:eol-style=native;svn:keywords=Id
*.txt  = svn:eol-style=native;svn:keywords=Id
*.mf   = svn:eol-style=native;svn:keywords=Id
*.sql  = svn:eol-style=native;svn:keywords=Id
*.props = svn:eol-style=native;svn:keywords=Id
*.properties = svn:eol-style=native;svn:keywords=Id
.htaccess = svn:eol-style=native;svn:keywords=Id
KEYS   = svn:eol-style=native
# Web, XML
*.htm  = svn:eol-style=native;svn:keywords=Id
*.html = svn:eol-style=native;svn:keywords=Id
*.jx   = svn:eol-style=native;svn:keywords=Id
*.js   = svn:eol-style=native;svn:keywords=Id
*.css  = svn:eol-style=native;svn:keywords=Id
*.svg  = svn:eol-style=native;svn:keywords=Id
*.x*   = svn:eol-style=native;svn:keywords=Id
*.roles = svn:eol-style=native;svn:keywords=Id
# DTD, Schemas, etc
*.dtd = svn:eol-style=native;svn:keywords=Id
*.ent = svn:eol-style=native;svn:keywords=Id
*.pen = svn:eol-style=native;svn:keywords=Id
*.mod = svn:eol-style=native;svn:keywords=Id
*.rng = svn:eol-style=native;svn:keywords=Id
# Images
*.gif  = svn:mime-type=image/gif
*.png  = svn:mime-type=image/png
*.jpg  = svn:mime-type=image/jpeg
*.jpeg = svn:mime-type=image/jpeg
*.ico  = svn:mime-type=application/octet-stream
# Binary
*.jar = svn:mime-type=application/octet-stream
*.pdf = svn:mime-type=application/pdf

TODO: Update with instruction for {sub|e}clipse users.