Menu

For committers

SourceForge Editorial Staff

For committers

For now this page will serve only one purpose: To explain how to set up autoprops in your Subversion configuration (as opposed to being a complete guide to the world of committing).

Files in Subversion have metadata which describe what type of data they hold -- text, binary, executable (so that the file is marked as executable in a Unix environment), and so on. These are hints to Subversion:

  • How to diff the file
  • Whether line endings should be native to your OS
  • On commit, whether a delta is sent for a change, or a binary is fully uploaded
  • How the repos browser decides to display files in your web browser

When add-ing or import-ing new files to the repository, autoprops automates the process of setting metadata. A regular expression maps a file name to a group of properties to set (*.exe should be binary, for instance).

For files not covered by the patterns below, or if you do not want to use autoprops, you can set metadata with svn propset, svn propget, and svn proplist, e.g.:

svn propset svn:mime-type text/plain foo.txt

Metadata Requirements

If you're a rebel and want to roll your own config file, or you're adding files which don't match one of the existing patterns (*.newkindofbinary or executable-binary-without-extension), it's important that you set metadata according to these guidelines (eventually a script will catch outlaws, for now you're on the Honor System).

Rule: All files must have metadata.

textsvn:mime-type=text/plain; svn:eol-style=native
binariessvn:mime-type=application/octet-stream
executable scriptssvn:mime-type=text/plain; svn:eol-style=native; svn:executable

Instructions

Windows

The Subversion configuration file is located at C:\Documents and Settings\<user>\Application Data\Subversion\config. You can download a pre-configured config and overwrite the existing file; if you'd like to amend an existing config file, integrate the settings in the next section.

TortoiseSVN sometimes uses a different configuration file. To access the TortoiseSVN configuration file:

  1. Right click on any folder under source control (image)
  2. Choose "TortoiseSVN"
  3. Choose "Settings"
  4. Click "General"
  5. Click "Edit" (image)

Tortoise's config file will open in Notepad, it may be the same one you edited. If not, repeat the changes.

Mac

The Subversion configuration file is located at ~/.subversion/config. You can download* a pre-configured config and overwrite the existing file; if you'd like to amend an existing config file, integrate the settings in the next section.

  • OS X likes to think this is a Quicktime file and will probably try to open it for you, ignore it -- config is just a text file without an extension. You can open it in Text Edit.

Autoprops for Flex Development

These are the minimum required mappings. If any important file types are missing, please suggest them in the comments.

[miscellany]
enable-auto-props = yes

[auto-props]
# IMAGES
*.gif = svn:mime-type=image/gif
*.jpg = svn:mime-type=image/jpeg
*.png = svn:mime-type=image/png
# BINARIES
*.abc = svn:mime-type=application/octet-stream
*.err = svn:mime-type=application/octet-stream
*.exe = svn:mime-type=application/octet-stream
*.jar = svn:mime-type=application/octet-stream
*.pdf = svn:mime-type=application/pdf
*.swc = svn:mime-type=application/octet-stream
*.zip = svn:mime-type=application/octet-stream
# TEXT
*.as = svn:mime-type=text/plain;svn:eol-style=native
*.css = svn:mime-type=text/plain;svn:eol-style=native
*.dtd = svn:mime-type=text/plain;svn:eol-style=native
*.htm = svn:mime-type=text/plain;svn:eol-style=native
*.html = svn:mime-type=text/plain;svn:eol-style=native
*.java = svn:mime-type=text/plain;svn:eol-style=native
*.jj = svn:mime-type=text/plain;svn:eol-style=native
*.js = svn:mime-type=text/plain;svn:eol-style=native
*.jjt = svn:mime-type=text/plain;svn:eol-style=native
*.mxml = svn:mime-type=text/plain;svn:eol-style=native
*.properties = svn:mime-type=text/plain;svn:eol-style=native
*.project = svn:mime-type=text/plain;svn:eol-style=native
*.svg = svn:mime-type=text/plain;svn:eol-style=native
*.txt = svn:mime-type=text/plain;svn:eol-style=native
*.vm = svn:mime-type=text/plain;svn:eol-style=native
*.xml = svn:mime-type=text/plain;svn:eol-style=native
*.xsl = svn:mime-type=text/plain;svn:eol-style=native
*.vsl = svn:mime-type=text/plain;svn:eol-style=native
# EXECUTABLE
*.py = svn:mime-type=text/plain;svn:eol-style=native;svn:executable
*.bat = svn:mime-type=text/plain;svn:eol-style=native;svn:executable
*.sh = svn:mime-type=text/plain;svn:eol-style=native;svn:executable

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.