05401, 05403, 05446, 05462, 05482, 05673, 05701, 37signals, 40hz, 2008, 2010, aardman animations, ac propulsion, adium, ads, aim, airport, al franken, algorithm, amazon, andy hertzfeld, animation, apache, apple, applescript, architecture, archive, art, article id, asterisk, at&t, atom, automobile, away message, backpack, badge, barack obama, basecamp, bash, beos, bernie sanders, bicycling, bill atkinson, billboard, blacklisting, blog, blogroll, blogzot, bluetooth, blunt, bluray, book, bookmarklet, bot-net, brad bird, browser, btv, bug, build, bungie, bunny, burlington, call of duty, camera, camping, can-spam, cars, centralized, channel camp, chocolate, classic, classic mac workshop, clothing, cms, collection, color classic, comedy, comedy central, comic, computer, concert, conversion, cookbook, corrosion, cowards way out, crack, crashing, creature comforts, criticism, daring fireball, darwin, dashboard, david byrne, dcl, death, delicious, derbi, design, development, digg, dilemma, discussion, disney, domain, download, drivers, dvd, dynetk, e-mail, e3, easter, ebox, eckhart, eckhart köppen, eckhart koppen, eddie izzard, edward gorey, einstein, election, electric motorcycle, electric motorsport, electric vehicle, electronics research laboratory, elmo, emate, emulator, encryption, environment, environmental impact, erin mckeown, escale, exploit, express 530t, expressionengine, feature, feed, feedburner, filtering, finance, firmware, fixdavsvn, flickr, flynn center, focus, font, food, ford, for sale, free, freeverse, freezing, fresh air, frog design, front row, fusion, games, gears of war, geek, geek technique, geocities, gmail, google, gpr, grammar, grant hutchinson, graylisting, gtd, hack, haiku, halo, hayao miyazaki, health, higher ground, highrise, hiking, hiroshi noguchi, history, hope, hotspot, html, html5, hulu, humor, hybrid, hybrid technologies, hypercard, intel, internet, interview, ipad, iphone, ipod touch, isao takahata, itunes, jabber, japan, javascript, jetblue, jfk, john gruber, john oliver, jon stewart, kid koala, launchd, layover, leopard, liberal, long trail, lorem ipsum, mac, macbook pro, macpaint, macworld, maczot, magazine, mail, maine, makkintosshu, marathon, marketing, mark hoekstra, matthias melcher, media, mesagepad, messagepad, microbus, microsoft, mobileme, model s, modern warfare, money, monitoring, moon river, motorola, movie, movies, mrtg, multitasking, music, mwsf07, mystic, nascar, ncx, nda, netflix, network, newton, newton os, newton press, newtontalk, newton x press, nick park, nitch, npr, on point, openpbx, open source, operation ivy, optimization, organic, os 6, os 8, os9, osheaga, osx, os x, owc, package, palm, password, patch, paul guyot, pbx, pdf, pesticides, photography, pico card, pilot, pixar, playstation, plist, plug-in, pod jungle, politics, productivity, ps3, psp, pump-and-dump, quickdraw, quicksilver, racism, rack-n-roll, radio, ratatouille, rebooting, recycling, remake, required reading, restoration, retrochallenge, review, roadster, room without a window, rss, scion, screencast, script, search, security, server, sesame street, seven days, shame, shelburne, shelburne museum, shirt, shoppinging cart, signature, simon bell, small dog electronics, snow leopard, social, software, solution, sony, spam, spam haus, startup item, statistics, status, stefano paris, stephen colbert, steve jobs, steven colbert, steven frank, studio 360, studio ghibli, subethaedit, subversion, susan kare, swiss, sync, syndication, sysmon, tablet, tags, tax, technorati, ted talk, television, terry gross, tesla motors, textpattern, the colbert report, the daily show, the flaming lips, the gashleycrumb tinies, the radiator, the world, times argus, titles, tkip, todd kollins, tom gage, trailer, travel, tree, trends, troubleshooting, truetype, twitter, typography, tzero, unicel, unna, update, upgrade, url title, user interface, v710, venue, verizon wireless, vermont, victor rehorst, video, virtualization, vmware, volkswagen, volvo 122, vpr, vw, wait wait don't tell me, wall-e, wallace & gromit, wavelan, web, web 2.0, webkit, web site, whitepaper, wifi, wikipedia, windows, winter warm-up, wireless, wpa, writing, wwdc, wwnc, xbox 360, xbox live, xhtml, yahoo, ze frank, zero emission
Articles Tagged "subversion":
Automating fixDAVsvn ¬
2009-11-17
I published my fixDAVsvn script seven months (and one day) ago to automate the process of fixing apache configuration files that have been manually modified to serve up Subversion repositories (per Nayan Hajratwala’s instructions) when they’re overwritten by Server Admin. This has made managing my apache install considerably easier, but upon rolling it out on a colleague’s server this afternoon I realized it was only ever a half solution. Sure, I had saved myself considerable time just by running fixDAVsvn, but others aren’t necessarily going to want to and there’s really no need. Time to add the second half.
So, how does one automate the process of running a command on a particular file whenever it’s modified? With launchd, of course! launchd drives some admins nuts, but I find it to be quite a boon and this happens to be exactly one of the cases it was designed for. So, I whipped up /Library/LaunchDaemons/com.makkintosshu.fixDAVsvn.plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN http://www.apple.com/DTDs/PropertyList-1.0.dtd >
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.makkintosshu.fixDAVsvn</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/fixDAVsvn</string>
<string>/etc/apache2/sites/0001_any_80_svn.domain.tld.conf</string>
</array>
<key>WatchPaths</key>
<array>
<string>/etc/apache2/sites/0001_any_80_svn.domain.tld.conf</string>
</array>
</dict>
</plist>
The full path to the config file to run fixDAVsvn on needs to exist in both the ProgramArguments & WatchPaths arrays in com.makkintosshu.fixDAVsvn.plist. That said, you can add as many config files to watch and fix as you like.
So, the complete solution1 is to install fixDAVsvn and com.makkintosshu.fixDAVsvn.plist, then edit the latter to watch & fix your modified apache configuration files. I’ll likely package this all up with a script to build com.makkintosshu.fixDAVsvn.plist’s list of files automatically, but it may be another seven months.
1 This solution has been tested on both Mac OS X 10.5 (Leopard) Server and Mac OS X 10.6 (Snow Leopard) Server.
fixDAVsvn ¬
2009-03-07
Subversion, mod_dav, and mod_dav_svn are all pre-installed on Leopard Server, authentication via Open Directory is a piece of cake, and you can even mostly config & manage via Server Admin. Nayan Hajratwala has a good tutorial explaining the setup and the few lines you have to manually add to the apache config files, but there’s one problem: whenever you update any site using Server Admin, it replaces all occurrences of ‘DAV svn’ with ‘DAV Off’, completely defeating the purpose.
When I just had just a couple of Subversion repositories and wasn’t changing my apache configs very frequently it was fine to manually switch ‘DAV Off’ back to ‘DAV svn’ and restart apache, but recently I’ve exceeded my tolerance. So, this morning I whipped up the following bash script which accepts the names of config files that’ll need to be fixed, performs the substitution, and restarts apache:
#!/bin/bash# # fixDAVsvn - Replace occurrences of 'DAV Off' in specified apache2 configs with # 'DAV svn' and restart apache. This helps do some dirty work on Mac # OS X Server when using Server Admin to modify apache configs if # you use DAV svn anywhere. # # v0.1 - 2009-03-07 - Morgan Aldridge <morgant@makkintosshu.com> # Initial development. #date=`date "+%Y-%m-%d-%H%M"`function usage() { printf "Usage: fixDAVsvn file [...]\n" }if [ $# -gt 0 ]; then until [ -z "$1" ]; do src=$1 dst=$src-$date.bak rsync -a $src $dst # back up the original file cat $dst | sed 's/DAV Off/DAV svn/g' > $src # replace 'DAV Off' w/'DAV svn' shift done/usr/sbin/apachectl restart # reload the apache configs else usage fi
I’d suggest installing it into /usr/local/bin/.
Example usage:
sudo fixDAVsvn /etc/apache2/sites/0003_any_80_svn.domain.tld.conf
Let me know if you find this useful.
Update: I’ve since released a launchd job which automates the process of running fixDAVsvn when the apache config files are modified (esp. by Server Admin).
Introduction to Subversion Screencast ¬
2008-06-05
While on the topic of Subversion, I highly suggest that those just getting started with it or needing a quick refresher go watch Mike Zornek’s excellent screencast.
Subversion on Leopard Server ¬
2008-06-05
[H]ere is how I got my subversion repository up and running with the built in Apache 2 and OpenDirectory.
Very simple and straightforward instructions for setting up WebDAV access (with authentication) to your Subversion repositories under Leopard Server. Worked like a charm for me.

