Description

Some VCS enable developers to store more than just a file's content or simple metadata.

Current Implementation

SVN Implementation

In addition to file's content SVN has support for storing arbitrary key/value pairs associated with a given file, which are also versioned. SVN calls these properties. One such property is svn:mime-type. "If a file's svn:mime-type property is set to a non-text MIME type, Subversion will assume that the file contains binary".

Hg Implementation

In order to stay as OS-independent as possible, Hg does not really store anything except the execute-bit permission. All files are binary and stored the same way. There is an extension to deal with the End-of-line (EOL) problem between Windows and UNIX systems but that is a filtering feature more than MIME handling.

Git Implementation

Git now includes support for gitattributes which can be set on files or on globs. Thus a mime-type attribute could be set. On the other hand git has always been able to detect if a file is binary and if so treats it accordingly.

Monotone Implementation

Supported (also see monotone:FeatureMIMEtypes)

There is no explicit support for MIME-type information specifically; Monotone has no particular use for this information internally, and will simply store binary files like any other. However, this and any other similar information about files can be stored in a custom attr on the file, and any special file handling related to the mime type can be defined in an attr hook.

Example Usage

 $ mtn attr set *.html MIMEType text/html
 $ mtn commit

VCSFeatureMIMEType (last edited 2008-06-17 21:38:02 by localhost)