Checking SVN mime types when adding rather than when committing

Problem

When adding files to a SVN repository, their type are checked against a list at ./subversion/conf

Files that are not matched raise an error, but only in the commit phase. My problem is that depending on the size of the code you’re commiting, it may take a while until you see the error, in which case you need to revert the added file, add an entry on the subversion/conf and then svn-add the file again.

I’d like know before svn-adding, which files are not matching, so then I can avoid the revert step and also don’t need to wait until commit phase.

Solution

I’ve found no solution, but I’ve developed a python script to do that for me. The parsing was hard-coded so maybe one needs to do some tweaks before using it.

Source: https://gist.github.com/1150253

Further reading:
http://svnbook.red-bean.com/en/1.5/svn.advanced.props.file-portability.html

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s