Subversion Settings

Revision as of 23:29, 13 January 2011 by Jfiat (Talk | contribs) (Configuration's examples)

Overview

  • To ensure Subversion is used as wanted, please configure your machine/account as described below to ensure that we enable keywords expansion. The SVN repository is configured to check those keywords, if there are not set, you won't be able to commit new files.
  • Basically you will need to enable auto properties, and set the value for each type of file. Check at the end of this page for examples.

Install the tools

You will find everything needed on the download page of the subversion project page. Especially the subversion command line tools and, for windows users, TortoiseSVN (a graphical tool integrated with the windows Shell).

Configure your account

Configuration : file locations

Typically, Subversion uses two per-user and site-wide configurations.

site-wide configuration

 Unix:
   /etc/subversion/config

 Windows:
   %ALLUSERSPROFILE%\Application Data\Subversion\config
   REGISTRY:HKLM\Software\Tigris.org\Subversion\Config

per-user configuration

 Unix:
   ~/.subversion/config

 Windows:
   %APPDATA%\Subversion\config
   REGISTRY:HKCU\Software\Tigris.org\Subversion\Config

Windows

  • You can configure your subversion client tools using different ways: INI files and windows registry keys
  • Registry-based configuration options are parsed before their file-based counterparts, so are overridden by values found in the configuration files. In other words, configuration priority is granted in the following order on a Windows system:
  1. Command-line options
  2. The per-user INI files
  3. The per-user Registry values
  4. The system-wide INI files
  5. The system-wide Registry values
  • Check the "%APPDATA%\subversion" folder

Linux

  • Use INI based file. Check at the end of this page for examples.

Configuration's examples

  • Here are concrete examples, I would advice you to use the INI based files, this way you can copy them easily and even use them on linux and so on. (And also because registry keys are not that easy to edit, and you may have to reboot, or restart a few application to take them into account)
  • Using registry keys
REGEDIT4  

[HKEY_CURRENT_USER\Software\Tigris.org\Subversion]

[HKEY_CURRENT_USER\Software\Tigris.org\Subversion\Config] 

[HKEY_CURRENT_USER\Software\Tigris.org\Subversion\Config\miscellany]
"global-ignores"="*.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* *.swp .*.swp ~* EIFGENs .git " 
"enable-auto-props"="yes"
"use-commit-times"="yes"

[HKEY_CURRENT_USER\Software\Tigris.org\Subversion\Config\auto-props]
"*.e"="svn:keywords=Author Date ID Revision;svn:eol-style=native"
"*.c"="svn:keywords=Author Date ID Revision;svn:eol-style=native"
"*.h"="svn:keywords=Author Date ID Revision;svn:eol-style=native"
"*.cpp"="svn:keywords=Author Date ID Revision;svn:eol-style=native"
"*.y"="svn:keywords=Author Date ID Revision;svn:eol-style=native"
"*.py"="svn:keywords=Author Date ID Revision;svn:eol-style=native"
"*.ecf"="svn:keywords=Author Date ID Revision;svn:eol-style=native"
"*.xace"="svn:keywords=Author Date ID Revision;svn:eol-style=native"
"*.ace"="svn:keywords=Author Date ID Revision;svn:eol-style=native"
"*.ge"="svn:keywords=Author Date ID Revision;svn:eol-style=native"
"*.eant"="svn:keywords=Author Date ID Revision;svn:eol-style=native"
"*.bm"="svn:keywords=Author Date ID Revision;svn:eol-style=native"
"*.bat"="svn:keywords=Author Date ID Revision;svn:eol-style=native"
"*.sh"="svn:keywords=Author Date ID Revision;svn:eol-style=native"
"*.xeb"="svn:keywords=Author Date ID Revision;svn:eol-style=native"
"Mak*"="svn:keywords=Author Date ID Revision;svn:eol-style=native"
"tcf"="svn:eol-style=native"
"output"="svn:eol-style=native"
"output?"="svn:eol-style=native"


  • Using INI based files:
[miscellany]
global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* *.swp ~*
enable-auto-props = yes
use-commit-times = yes

[auto-props]

[auto-props]

*.e = svn:keywords=Author Date ID Revision;svn:eol-style=native
*.c = svn:keywords=Author Date ID Revision;svn:eol-style=native
*.h = svn:keywords=Author Date ID Revision;svn:eol-style=native
*.cpp = svn:keywords=Author Date ID Revision;svn:eol-style=native
*.y = svn:keywords=Author Date ID Revision;svn:eol-style=native
*.py = svn:keywords=Author Date ID Revision;svn:eol-style=native
*.ecf = svn:keywords=Author Date ID Revision;svn:eol-style=native
*.xace = svn:keywords=Author Date ID Revision;svn:eol-style=native
*.ace = svn:keywords=Author Date ID Revision;svn:eol-style=native
*.ge = svn:keywords=Author Date ID Revision;svn:eol-style=native
*.eant = svn:keywords=Author Date ID Revision;svn:eol-style=native
*.bm = svn:keywords=Author Date ID Revision;svn:eol-style=native
*.bat = svn:keywords=Author Date ID Revision;svn:eol-style=native
*.sh = svn:keywords=Author Date ID Revision;svn:eol-style=native
*.xeb = svn:keywords=Author Date ID Revision;svn:eol-style=native
Mak* = svn:keywords=Author Date ID Revision;svn:eol-style=native
tcf = svn:eol-style=native
output = svn:eol-style=native
output? = svn:eol-style=native

Read More

Read the tutorial on subversion for more details about subversion.