Wednesday, December 05, 2007

Mmmm, Subversive Goodness on OS X!

I use Subversion for revision control on my Mac (as well as the Windows and Linux boxen of my collaborators). When I run an update, I used to get Subversion's default behavior in the event of a conflict (i.e., a change to lines in my local copy which are also changed in the new revision from the repository). This consists of a "C" indication on the status output, hoses the original file with conflict indicators, and as a special bonus generates three new files for my viewing pleasure (.mine, .r333, and .r340, if my local copy started at rev 333 the repository is now up to rev 340).

Apple's XCode comes with a slick little visual-diff utility called FileMerge (aka "opendiff"); a nice fellow named Bruno de Fraine at Vrije Universiteit Brussel wrote some wrapper scripts for Subversion that call FileMerge when differences arise. The scripts work both for the normal time-to-update use case as well as the conflicted one; time will tell if I really like the former, but I am in LOVE with the latter. When a conflict arises, you see a GUI and merely pick the set of changes you want from either side, then save the result. Ahhh!

I did have to change one thing in one of the scripts to get it working on my Mac: There is no "tempfile" utility, so I replaced that invocation with "mktemp /tmp/madeup_root.XXXX".



Post a Comment

<< Home