All of my tutorials if you haven't noticed make use of MacPorts, if you don't have it installed already now would be a good time to install it.
First thing you want to do whenever you're installing something from MacPorts is make sure you're current. We'll do a selfupdate to upgrade existing packages and update package info.
- dStruct:~ Matt$ sudo port selfupdate
- dStruct:~ Matt$ sudo port install svn
- dStruct:~ Matt$ svn
- -bash: svn: command not found
- dStruct:~ Matt$ nano .profile
- export PATH=/opt/local/bin:/opt/local/sbin:$PATH
- dStruct:~ Matt$ svn
- Type 'svn help' for usage.
First thing to do is decide where you want your Repository located on your drive (I use ~/SVN) and then we want to create the Repository directory and it's file structure.
- dStruct:~ Matt$ svnadmin create ~/SVN
Let's do a test run and make sure the SVN Server fires up with the default settings and no authentication, and that we can check out the Repository.
- dStruct:~ Matt$ svnserve -d -r ~/SVN/
- dStruct:~ Matt$ svn checkout svn://dStruct/ ~/test
- Checked out revision 0.
- dStruct:~ Matt$ killall svnserve
- dStruct:~ Matt$ cd /Library/LaunchDaemon
- dStruct:LaunchDaemon Matt$ sudo nano org.tigris.subversion.svnserve.plist
<?xml version="1.0" encoding="UTF-8"?>With that file saved now we need to add it to the Launch Daemon and we'll go ahead and fire it up right now manually as if we just booted up.
<!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>Disabled</key>
<false/>
<key>Label</key>
<string>org.tigris.subversion.svnserve</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/svnserve (EDIT THIS LINE)</string>
<string>--inetd</string>
<string>--root=/Users/YourUsername/SVN (EDIT THIS LINE)</string>
</array>
<key>ServiceDescription</key>
<string>Subversion Standalone Server</string>
<key>Sockets</key>
<dict>
<key>Listeners</key>
<array>
<dict>
<key>SockFamily</key>
<string>IPv4</string>
<key>SockServiceName</key>
<string>svn</string>
<key>SockType</key>
<string>stream</string>
</dict>
<dict>
<key>SockFamily</key>
<string>IPv6</string>
<key>SockServiceName</key>
<string>svn</string>
<key>SockType</key>
<string>stream</string>
</dict>
</array>
</dict>
<key>inetdCompatibility</key>
<dict>
<key>Wait</key>
<false/>
</dict>
</dict>
</plist>
- dStruct:~ Matt$ sudo launchctl load /Library/LaunchDaemon/org.tigris.subversion.svnserve.plist
- dStruct:~ Matt$ sudo launchctl start org.tigris.subversion.svnserve
- dStruct:~ Matt$ svn checkout svn://dStruct/ ~/test
- Checked out revision 0.
Version Control with Subversion
Subversion server (svnserve) on Mac OS X