Subversion desktop synchronizing
I mentioned in an earlier post about groove and synchronization that I was more interested in using subversion to synchronize my work on multiple computers — an idea I first saw in this Martin Fowler post.
Adding a mac to our home has finally forced the issue, and I’ve now got a subversion repository on the mac for synch’ing my stuff across different machines. I’ve not pushed the Multiple Desktops idea very far yet — I hope to report back on that later — but I took some subversion setup notes in case you’re trying to do something similar.
My initial goals are to keep it simple: synch’ing only within the LAN, using svnserve (rather than apache). I’d like to push the repository out to a public host to have access from anywhere, but it seems I can do that later by moving to the svn+ssh scheme. I’m starting with text files, source trees, things like that, but am hoping to include more complicated things like my personal wiki, thunderbird email, etc as well.
My subversion setup was cribbed from two things I found on the net: Frank Pape’s tutorial and Bill Dudney’s post. Neither was completely clean for me, an OS X newbie, hence my posting. Bill’s post in particular got me past the nicl and xinetd stuff that I’d never used before. In addition, I used the excellent red-bean svn book.
I’ll skip my missteps and give the procedure that I think would have been “svn on mac for dummies,” referencing Frank and Bill as appropriate.
- [Frank] install Martin Ott’s package (I didn’t use
finkas Bill did) - [Frank] do the
MANPATHand.bash_profilechanges; I needed tosudoforman.conf - [Bill 2] setup
svnserveas a service withxinetd, adjusting for your paths - [Bill 4] add a dedicated
svnuser and group to own the repositories and runsvnserve(much cleaner) - log in as
svn, add/usr/local/bin/to yourPATH, and create your repository (you’re homed to the repository parent dir created above). I created two,svnadmin create /usr/local/svn.repositories/daveandsvnadmin create /usr/local/svn.repositories/sandbox, but adjust your path. - still as
svn, configure authentication by editing the files inconf/for each repository. It’s dead easy and the red-bean book chapter 6 has it covered. Since this is all about multiple desktops for me, and since I’d like to see the different desktops in the svn log, I created a user for each box:davemac,davenote,davepc. These are just svn users, no need to correlate with osx users unless you want to. - [Bill 5] restart xinetd (I had to kill -9)
- [Frank] setup the initial recommended repository structure on disk somewhere and ‘import’ it into each repository. You can also import some existing tree, but I’d recommend getting the top-level structure over it first (e.g. put your tree in ‘trunk’). Frank uses the
file://scheme, but if the steps above worked, you should be able to usesvn://.
Note that the new user svn is just for owning the repositories and running svnserve; I wouldn’t use it for anything else (e.g. creating working copies).
This was done with the pre-built subversion 1.2 and mac OS X 10.4 tiger. The procedure above was written after the fact, not tested, so if I’ve got something wrong let me know.