Adobe Open Source
   Home     Projects     Source     Documentation     Forums    About
Welcome Guest | Sign In
 

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.

text svn:mime-type=text/plain; svn:eol-style=native
binaries svn:mime-type=application/octet-stream
executable scripts svn: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
You must be logged in to comment.
Flex SDK Project
Home
About
Versions
Downloads
Source
Bug Database
Submitting a Patch
Developer Documentation
Forums
License

Pages
Comments

Other Projects
BlazeDS
Cairngorm
Corelib
FlexUnit

More related projects ›
More Adobe projects ›

 
Last Modified: 2008-08-04 13:15:59.0
Powered by Atlassian Confluence 2.7.1, the Enterprise Wiki.

Company | Online Privacy Policy | Terms of Use | Contact Us | Accessibility | Report Piracy | Permissions & Trademarks

Copyright @ 2008 Adobe Systems Incorporated.
Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy.
Search powered by Google