Way of the Monkey
September 2010
S M T W T F S
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30
Donate!
Projects
Tango Portfolio
Cool People
Anna Dirks
Andreas Nilsson
Andy Fitzsimmon
Frédéric Bellaiche
Hylke Bons
Jakub Steiner
Josef Vybiral
Olivier Charavel
Ryan Collier
Sebastian Kraft
Simon Pascal Klein
Steven Garrity
Tuomas Kuosmanen
Vinicius Depizzol
Recent Music
Subverting Subversion Thu, 04 Jan 2007 15:09:48 -0500

So, now that GNOME has finally switched to SVN, I've been trying to get all the repos that I have checked out, moved over to the SVN versions, and how to keep some features I used in CVS, that are fairly important, in tact. One of those features, for example, is the .cvsignore file. Thankfully, SVN supports ignore lists, but it doesn't automatically read them from a file like CVS does. You have to set the svn:ignore property on the directory, which is basically the same content as .cvsignore, but without an easy way to append new files. Don't delete your project's .cvsignore files! Instead, keep them up to date when you add new files that need to be ignored, and you can just run the following command to update the svn:ignore property:

$ svn propset svn:ignore -F .cvsignore .

Another valuable feature is the ability to pass the -p option to the diff command, so that it will print out the method names containing the changes to code. Doing this with SVN straight from the command line is annoying, as you have to specify --diff-cmd and --extensions all the time. You can set diff-cmd in your ~/.subversion/config file, but that still doesn't get you the -p option. And there's no way to set the extensions to pass in the config file. However, robsta pointed out this link, which shows how to do this by setting the diff-cmd option to a shell script which calls the real diff program.

Not a feature of CVS, but something valuable to artists working on icon themes, the following bits from my ~/.subversion/config file will automatically set the mime-type for new images being added, so that they can be properly viewed from the web interface:

[miscellany]
enable-auto-props = yes

[auto-props]
*.png = svn:mime-type=image/png
*.jpg = svn:mime-type=image/jpeg
*.svg = svn:mime-type=image/svg+xml
*.svgz = svn:mime-type=image/svg+xml
*.xcf = svn:mime-type=image/x-xcf
*.xcf.gz = svn:mime-type=image/x-compressed-xcf
*.xcf.bz2 = svn:mime-type=image/x-compressed-xcf
*.ico = svn:mime-type=image/x-ico

You can also set log-encoding under [miscellany] to UTF-8 so that log messages will be encoded nicely for developers from non-latin1 countries, like China.




Ninja Monkey icon based on face-monkey icon from The Tango Project