Configuring your Subversion client

The IgorExchange repository requires that for every file added to the repository ONE of the following statements must be true:

  • The file has the Subversion property svn:eol-style=native
  • The file has the Subversion property svn:mime-type property set and the value of that property is NOT text/plain.

The easiest way to make sure that one of the above statements is always true is to edit your Subversion config file on your computer.

For detailed instructions on how to make changes to these configuration settings, see the following links.

If for some reason you do not wish to use automatic property setting (as described below), instructions for how to manually edit the Subversion properties of files so that you can add them to the repository can be found at:

The rest of the text in this topic is primarily here to explain to the curious user what the configuration changes described in these links do.

[miscellany] section


global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store
Certain file types, including temporary files, backups, etc. should not be added to the repository because they are unnecessary. The global-ignores setting allows you to specify certain patterns that cause files with names that match the pattern to automatically be ignored and therefore makes it less likely that you will accidentally add or import one of these files to the repository.

The .DS_Store file is a file created by the Macintosh Finder. This is where it stores information such as whether you are viewing by icon or viewing as a list. Including this file type in the ignore list will help to ensure that .DS_Store files are not added to the repository.


enable-auto-props = yes
Setting this variable to yes, in conjunction with making the changes indicated in the next section, prevent problems with line endings in text files.

[auto-props] section

On Windows the default line ending is CRLF. On Macintosh, it is CR if you are using an old editor such as CodeWarrior or LF if you are using a new editor such as Xcode. If two collaborators use different line endings, every time you commit a file, it will appear as if every line has changed. This throws a monkey wrench into Subversion because Subversion needs to know exactly what was changed in a file from one commit to the next.

In order to prevent problems with line endings, you need to use the eol-style=native flag in the SVN config file. Note that all of the text file types (.txt, .c, .cpp, ipf, etc.) have svn:eol-style=native. This tells Subversion to use the native line ending when checking a file out to a programmer's machine but to use the standard line ending (LF) when committing a file back to the repository.

The auto-props settings take effect only if enable-auto-props = yes also appears in the miscellany section of the config file, as explained in the previous section.

The list of file types below should be added at the end of the [auto-props] section of your Subversion config file. If you have already edited this file for another reason, you do not need to modify those previous changes unless they conflict with the lines below. If there are other file types that you expect to add to the repository you must either add those file types and the appropriate properties to the list below or manually set those properties for each file of a type that is not included in the list below.

[auto-props]
#####
# Text file formats
#####
*.txt = svn:eol-style=native
*.xml = svn:eol-style=native
*.xslt = svn:eol-style=native
*.xsl = svn:eol-style=native
*.html = svn:eol-style=native
*.xhtml = svn:eol-style=native

#####
# Image file formats
#####
*.png = svn:mime-type=image/png
*.jpg = svn:mime-type=image/jpeg
*.gif = svn:mime-type=image/gif
*.tif = svn:mime-type=image/tiff
*.bmp = svn:mime-type=image/bmp
*.icns = svn:mime-type=image/icns
*.wmf = svn:mime-type=image/wmf
*.emf = svn:mime-type=image/emf

#####
# Igor Pro file formats
#####
### Text
*.ipf = svn:eol-style=native
*.itx = svn:eol-style=native
*.csv = svn:eol-style=native

### Binary
*.xop = svn:mime-type=application/octet-stream
*.ifn = svn:mime-type=application/octet-stream
*.ihf = svn:mime-type=application/octet-stream
*.ift = svn:mime-type=application/octet-stream
*.pxp = svn:mime-type=application/octet-stream
*.uxp = svn:mime-type=application/octet-stream
*.uxt = svn:mime-type=application/octet-stream
*.pxt = svn:mime-type=application/octet-stream
*.ibw = svn:mime-type=application/octet-stream
*.ibt = svn:mime-type=application/octet-stream
*.ibv = svn:mime-type=application/octet-stream

#####
# Code file formats (text)
#####
*.c = svn:eol-style=native
*.cpp = svn:eol-style=native
*.h = svn:eol-style=native
*.hpp = svn:eol-style=native
*.r = svn:eol-style=native
*.rc = svn:eol-style=native
*.rtf = svn:eol-style=native
*.odi = svn:eol-style=native
*.reg = svn:eol-style=native
*.plist = svn:eol-style=native
*.f = svn:eol-style=native
*.f90 = svn:eol-style=native
*.f95 = svn:eol-style=native

#####
# Other binary file formats
#####
*.a = svn:mime-type=application/octet-stream
*.dll = svn:mime-type=application/octet-stream
*.lib = svn:mime-type=application/octet-stream
*.pdf = svn:mime-type=application/pdf

Sample

An example of a complete Subversion config file is shown below. You can copy and paste this text into your text editor and save the file as config (with no extension) in the appropriate directory.


### 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, and
### while importing or adding files and directories.
global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store
### 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.
# *.c = svn:eol-style=native
# *.cpp = svn:eol-style=native
# *.h = svn:eol-style=native
# *.dsp = svn:eol-style=CRLF
# *.dsw = svn:eol-style=CRLF
# *.sh = svn:eol-style=native;svn:executable
# *.txt = svn:eol-style=native
# *.png = svn:mime-type=image/png
# *.jpg = svn:mime-type=image/jpeg
# Makefile = svn:eol-style=native
#####
# Text file formats
#####
*.txt = svn:eol-style=native
*.xml = svn:eol-style=native
*.xslt = svn:eol-style=native
*.xsl = svn:eol-style=native
*.html = svn:eol-style=native
*.xhtml = svn:eol-style=native

#####
# Image file formats
#####
*.png = svn:mime-type=image/png
*.jpg = svn:mime-type=image/jpeg
*.gif = svn:mime-type=image/gif
*.tif = svn:mime-type=image/tiff
*.bmp = svn:mime-type=image/bmp
*.icns = svn:mime-type=image/icns
*.wmf = svn:mime-type=image/wmf
*.emf = svn:mime-type=image/emf

#####
# Igor Pro file formats
#####
### Text
*.ipf = svn:eol-style=native
*.itx = svn:eol-style=native
*.csv = svn:eol-style=native

### Binary
*.xop = svn:mime-type=application/octet-stream
*.ifn = svn:mime-type=application/octet-stream
*.ihf = svn:mime-type=application/octet-stream
*.ift = svn:mime-type=application/octet-stream
*.pxp = svn:mime-type=application/octet-stream
*.uxp = svn:mime-type=application/octet-stream
*.uxt = svn:mime-type=application/octet-stream
*.pxt = svn:mime-type=application/octet-stream
*.ibw = svn:mime-type=application/octet-stream
*.ibt = svn:mime-type=application/octet-stream
*.ibv = svn:mime-type=application/octet-stream

#####
# Code file formats (text)
#####
*.c = svn:eol-style=native
*.cpp = svn:eol-style=native
*.h = svn:eol-style=native
*.hpp = svn:eol-style=native
*.r = svn:eol-style=native
*.rc = svn:eol-style=native
*.rtf = svn:eol-style=native
*.odi = svn:eol-style=native
*.reg = svn:eol-style=native
*.plist = svn:eol-style=native
*.f = svn:eol-style=native
*.f90 = svn:eol-style=native
*.f95 = svn:eol-style=native

#####
# Other binary file formats
#####
*.a = svn:mime-type=application/octet-stream
*.dll = svn:mime-type=application/octet-stream
*.lib = svn:mime-type=application/octet-stream
*.pdf = svn:mime-type=application/pdf

Back to top