Subversion @ GitHub

I wanted to use Subversion to checkout one of my GitHub repo branches, because an svn checkout only downloads the files it needs, not a full copy of every file ever added. But I discovered that GitHub sunset Subversion integration earlier this year. Sad face. Still, I suppose the economics justify that decision. As a consequence of my research, which was a bit sketchy because there is still heaps of documentation out there referring to the GitHub features which no longer exist, I did happen to learn about:

Installing Subversion on Mac OS X with WebDAV support (serf library)

cd ~/Development/svn-install
wget http://prdownloads.sourceforge.net/scons/scons-2.3.4.tar.gz
wget http://mirror.ventraip.net.au/apache/apr/apr-1.5.1.tar.gz
wget http://mirror.ventraip.net.au/apache/apr/apr-util-1.5.4.tar.gz
wget http://mirror.ventraip.net.au/apache/subversion/subversion-1.8.10.tar.gz
tar xzf scons-2.3.4.tar.gz
tar xzf apr-1.5.1.tar.gz 
tar xzf apr-util-1.5.4.tar.gz
tar xzf subversion-1.8.10.tar.gz
cd scons-2.3.4
sudo python setup.py install
cd ../apr-1.5.1
./configure --prefix=/usr/local
make
sudo make install
cd ../apr-util-1.5.4
./configure --with-apr=/usr/local --prefix=/usr/local
make
sudo make install
cd ../subversion-1.8.10
sh get-deps.sh serf
cd serf
scons APR=/usr/local APU=/usr/local OPENSSL=/usr/local PREFIX=/usr/local
sudo scons PREFIX=/usr/local install
cd ..
./configure --with-openssl --with-serf=/usr/local --prefix=/usr/local
make
sudo make install

Nuff said!

Oh, wait… there’s a problem with misconfigured CA certificates…

cd ~/Development/svn-install
wget https://distfiles.macports.org/MacPorts/MacPorts-2.3.3-10.10-Yosemite.pkg

Run the MackPorts*.pkg…

xcode-select --install

Then…

sudo /opt/local/bin/port install curl-ca-bundle

Then…

sudo -s
cd /System/Library/OpenSSL/certs/
ln -s /opt/local/etc/openssl/cert.pem cert.pem
cd /usr/local/etc/openssl/certs
ln -s /opt/local/etc/openssl/cert.pem cert.pem

Testing:

openssl s_client -connect www.progclub.org:443 -CApath /opt/local/etc/openssl/

Using MacPorts OpenSSL:

sudo port install openssl
cd ~/Development/svn-install/subversion-1.8.10/serf/
scons APR=/usr/local APU=/usr/local OPENSSL=/opt/local PREFIX=/usr/local
sudo scons PREFIX=/usr/local install

Done!

Error: post-commit hook failed (exit code 255) with no output

In subversion I was getting the error “post-commit hook failed (exit code 255) with no output” after trying to configure my post-commit hook to send email notifications. At first I thought the problem must have been related to the mailer, but I ran the mail command manually and it worked fine. Eventually I figured out that the problem was that the hooks/post-commit file hadn’t been marked executable. So it was a simple chmod +x to fix the problem.