Developer Documents

From BRL-CAD
Revision as of 12:26, 28 May 2008 by Sean (talk | contribs) (talk about mime types)

Projects under active development

Developer FAQ

I'm trying to add a new file to the repository and I get an error on commit about mime types. What do I do?

You either set up your subversion config to auto-set mime types or you directly set the mime type on the file before you commit the file using svn propset.

Sean provides a copy of his Subversion config file that accounts for many mime types. You can download and install it with this:

curl http://brlcad.org/~sean/subversion.config > ~/.subversion/config

This problem usually looks like this:

Transmitting file data ...svn: Commit failed (details follow):
svn: MERGE request failed on '/svnroot/brlcad/brlcad/trunk/regress'
svn: 'pre-commit' hook failed with error output:
/var/local/mastertree/service-svn/hook-scripts/check-mime-type.pl:

brlcad/trunk/regress/some_new_file.c : svn:mime-type is not set


   Every added file must have the svn:mime-type property set. In
   addition text files must have the svn:eol-style property set.
   
   For binary files try running
   svn propset svn:mime-type application/octet-stream path/of/file
   
   For text files try
   svn propset svn:mime-type text/plain path/of/file
   svn propset svn:eol-style native path/of/file
   
   You may want to consider uncommenting the auto-props section
   in your ~/.subversion/config file. Read the Subversion book
   (http://svnbook.red-bean.com/), Chapter 7, Properties section,
   Automatic Property Setting subsection for more help.