I thought I would share the config file we currently use. We actually keep this file in Subversion and have all of our developers check it out into their home directory, thus overlaying the default config file you get with Subversion.
On Windows XP, this file lives in the C:/Documents and Settings/username/Application Data/Subversion/ directory and is simply called
config
. There are bunch of things you can set, but if you work with a diverse set of developers you probably have to limit what your standard defaults are. Here's the basic ones we set:- global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store .*.swp jtags Thumbs.db
This is a list of file types that will be ignored by the SVNstatus
,add
, and other commands. Using this in addition to occasionally setting the svn:ignore property on a directory are very nice ways of cleaning up what you see with the status command and making sure temporary files do not get into your repository. As long as you are adding odd filenames that you would never want in your repository to this list you won't have problems doing this, but if you added a filename or pattern that is needed in one project, then you are stuck and have to remove it from this list.- use-commit-times = yes
- This setting preserves the last modified time of files when you check them out of the repository. If you set this to no, then all of the files have the same timestamp of when you checked them out. Knowing which files were most recently touched is a nice convenience when looking through code so we default this to yes.
- enable-auto-props = yes
- If you want to use automatic properties for various file types, as I've done below, you need to enable it here.
Here's a full listing of our current config file. If you scroll to the bottom you will find our current listing of file types and the automatic properties that we set for them. One place that having automatic properties set correctly helps is with Subversion's HTTP sever. If you tell Subversion the mime-type of the file, then its HTTP server will serve up the files with the correct mime-type and your browser will correctly display the file. If you commit HTML pages or images to Subversion, this allows you to see the files displayed correctly when you navigate your repository in a browser.
### This file configures various client-side behaviors.
###
### The commented-out examples below are intended to demonstrate
### how to use this file.
### Section for authentication and authorization customizations.
[auth]
### Set store-passwords to 'no' to avoid storing passwords in the
### auth/ area of your config directory. It defaults to 'yes'.
### Note that this option only prevents saving of *new* passwords;
### it doesn't invalidate existing passwords. (To do that, remove
### the cache files by hand as described in the Subversion book.)
# store-passwords = no
### Set store-auth-creds to 'no' to avoid storing any subversion
### credentials in the auth/ area of your config directory.
### It defaults to 'yes'. Note that this option only prevents
### saving of *new* credentials; it doesn't invalidate existing
### caches. (To do that, remove the cache files by hand.)
# store-auth-creds = no
### Section for configuring external helper applications.
[helpers]
### Set editor to the command used to invoke your text editor.
### This will override the environment variables that Subversion
### examines by default to find this information ($EDITOR,
### et al).
# editor-cmd = editor (vi, emacs, notepad, etc.)
### Set diff-cmd to the absolute path of your 'diff' program.
### This will override the compile-time default, which is to use
### Subversion's internal diff implementation.
# diff-cmd = diff_program (diff, gdiff, etc.)
### Set diff3-cmd to the absolute path of your 'diff3' program.
### This will override the compile-time default, which is to use
### Subversion's internal diff3 implementation.
# diff3-cmd = diff3_program (diff3, gdiff3, etc.)
### Set diff3-has-program-arg to 'true' or 'yes' if your 'diff3'
### program accepts the '--diff-program' option.
# diff3-has-program-arg = [true | false]
### Section for configuring tunnel agents.
[tunnels]
### Configure svn protocol tunnel schemes here. By default, only
### the 'ssh' scheme is defined. You can define other schemes to
### be used with 'svn+scheme://hostname/path' URLs. A scheme
### definition is simply a command, optionally prefixed by an
### environment variable name which can override the command if it
### is defined. The command (or environment variable) may contain
### arguments, using standard shell quoting for arguments with
### spaces. The command will be invoked as:
### svnserve -t
### (If the URL includes a username, then the hostname will be
### passed to the tunnel agent as @.) If the
### built-in ssh scheme were not predefined, it could be defined
### as:
# ssh = $SVN_SSH ssh
### If you wanted to define a new 'rsh' scheme, to be used with
### 'svn+rsh:' URLs, you could do so as follows:
# rsh = rsh
### Or, if you wanted to specify a full path and arguments:
# rsh = /path/to/rsh -l myusername
### On Windows, if you are specifying a full path to a command,
### use a forward slash (/) or a paired backslash (\\) as the
### path separator. A single backslash will be treated as an
### escape for the following character.
### Section for configuring miscelleneous Subversion options.
[miscellany]
### Set global-ignores to a set of whitespace-delimited globs
### which Subversion will ignore in its 'status' output.
global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store .*.swp jtags Thumbs.db ~$*
### Set log-encoding to the default encoding for log messages
# log-encoding = latin1
### Set use-commit-times to make checkout/update/switch/revert
### put last-committed timestamps on every file touched.
use-commit-times = yes
### Set no-unlock to prevent 'svn commit' from automatically
### releasing locks on files.
# no-unlock = yes
### Set enable-auto-props to 'yes' to enable automatic properties
### for 'svn add' and 'svn import', it defaults to 'no'.
### Automatic properties are defined in the section 'auto-props'.
enable-auto-props = yes
### Section for configuring automatic properties.
[auto-props]
### The format of the entries is:
### file-name-pattern = propname[=value][;propname[=value]...]
### The file-name-pattern can contain wildcards (such as '*' and
### '?'). All entries which match will be applied to the file.
### Note that auto-props functionality must be enabled, which
### is typically done by setting the 'enable-auto-props' option.
# *.dsp = svn:eol-style=CRLF
# *.dsw = svn:eol-style=CRLF
*.bat = svn:eol-style=native;svn-mime-type=text/plain
*.bmp = svn:mime-type=image/bmp
*.bsh = svn:eol-style=native;svn:mime-type=text/x-beanshell
*.c = svn:eol-style=native
*.cpp = svn:eol-style=native
*.css = svn:eol-style=native;svn:mime-type=text/css
*.csv = svn:eol-style=native;svn:mime-type=text/plain
*.doc = svn:mime-type=application/msword
*.dtd = svn:eol-style=native;svn:mime-type=application/xml-dtd
*.gif = svn:mime-type=image/gif
*.h = svn:eol-style=native
*.htm = svn:eol-style=native;svn:mime-type=text/html
*.html = svn:eol-style=native;svn:mime-type=text/html
*.ico = svn:mime-type=image/x-icon
*.java = svn:eol-style=native
*.jnlp = svn:eol-style=native;svn:mime-type=application/x-java-jnlp-file
*.jpeg = svn:mime-type=image/jpeg
*.jpg = svn:mime-type=image/jpeg
*.js = svn:eol-style=native;svn:mime-type=text/plain
*.js = svn:eol-style=native;svn:mime-type=text/x-javascript
*.jsp = svn:eol-style=native
*.pdf = svn:mime-type=application/pdf
*.php = svn:eol-style=native;svn:mime-type=text/x-php
*.pl = svn:eol-style=native;svn:mime-type=text/x-perl;svn:executable
*.pm = svn:eol-style=native;svn:mime-type=text/x-perl
*.png = svn:mime-type=image/png
*.ppt = svn:mime-type=application/vnd.ms-powerpoint
*.properties = svn:eol-style=native;svn:mime-type=text/plain
*.py = svn:eol-style=native;svn:mime-type=text/x-python;svn:executable
*.sh = svn:eol-style=native;svn:mime-type=text/x-sh;svn:executable
*.spec = svn:eol-style=native;svn:mime-type=text/x-sh
*.sql = svn:eol-style=native;svn:mime-type=text/plain
*.text = svn:eol-style=native;svn:mime-type=text/plain
*.tif = svn:mime-type=image/tiff
*.tiff = svn:mime-type=image/tiff
*.tld = svn:eol-style=native;svn:mime-type=text/plain
*.txt = svn:eol-style=native;svn:mime-type=text/plain
*.xhtml = svn:eol-style=native;svn:mime-type=text/xhtml+xml
*.xls = svn:mime-type=application/vnd.ms-excel
*.xml = svn:eol-style=native;svn:mime-type=text/xml
*.xsd = svn:eol-style=native;svn:mime-type=text/xml
CHANGES = svn:eol-style=native;svn:mime-type=text/plain
COPYING = svn:eol-style=native;svn:mime-type=text/plain
INSTALL = svn:eol-style=native;svn:mime-type=text/plain
Makefile = svn:eol-style=native;svn:mime-type=text/plain
README = svn:eol-style=native;svn:mime-type=text/plain
TODO = svn:eol-style=native;svn:mime-type=text/plain
No comments:
Post a Comment