~/.subversion in svn

I have to do this way more often than I’d like, my home directory lives in svn, and my svn config comprises part of my home directory. The upshot is that subversion likes to make blank data if none already exists, and then falls in a heap if the path it’s trying to create is already there.

This gets worse if you already have config you like and goes totally sideways if you actually depend upon some of it to get a clean checkout.

The solutions isn’t complex- but isn’t obvious either. Most solutions I’ve seen involved invoking svn, then trying to throw it in the background after it creates metadata but BEFORE it begins creating files, and then nuke the files. Kludgy at best- I much prefer this approach.

#!/bin/sh
cd ~
mv .subversion _subversion
svn --config-dir _subversion up
echo "You must now merge _subversion into .subversion"

About richo

Flying, coffee, computer stuff.
This entry was posted in Guides, Hax and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *