Monday, November 12, 2007

Subversion Config File

The Subversion documentation is not clear on the true format of the config file with respect to multiple properties for a single file pattern. The answer is simple, use a ';' to separate each property.
*.sh = svn:eol-style=native;svn:executable
That said, this begs a little rant about Subversion. There is no server based push of configuration data to the clients. Even worse is that this is far from a priority for the developers.

Thus, you have to send out an email to your entire development team and ask them to edit the file in .subversion/config. What a royal pain in the ass. I recently had to do this because in a mixed office of OSX and Windows users, we were ending up with files with both line endings in them! When we did a merge, we had all sorts of weird conflicts. The only real solution to this problem is to get everyone to add eol-style=native lines like the one above to all of the 'text' files referenced in their config file. No fun at all and it really makes the IT department look like a bunch of idiots with crappy tools.

2 comments:

RjOllos said...

A condition in the pre-commit hook to enforce the `svn:eol-style=native` can also be a useful tool. In one case I enforced that the files must have the property `svn:eol-style=native` if they do not have the property `svn:mime-type=application/octet-stream`. This seemed to catch all human readable files.

Joseph Hitt said...

+1 on this being a royal pain in the ass