Here is the situation. You have a single subversion repository which has all your applications in it, but you now want to start enlisting outside contractors to build out different parts. Just give them their own login and everything will be great! Well, not really. It appears that permissions in svn are repository wide, not limited by branch or directory. And to add another wrinkle into the mix we are using the svn+ssh method of authorization which means we can’t leverage apache in the front-end to handle permissions. The solution then was to break out the single repository into separate repos for each of the applications we are going to let external people at.

# this is where the svn repos are
cd /var/svn/

# create the new repo we are going to import things into
sudo svnadmin create /var/svn/new_repo

# dump the old repo
sudo svnadmin dump /var/svn/old_repo/ > /tmp/old_repo.dump

# pump the dumpfile through the filter tool which will only include the parts of
# the existing repo that has the product you want in the new rep
cat old.dump | svndumpfilter include existing_path/to/new > new.dump

# import the now filtered repo contents in to the new location
sudo svnadmin load new_repo 
<p>
Now you just have a separate repo where you people who are supposed to see certain code only get that specific code. And once you have confirmed that everything in the new repo is working, remove it from the old one so you don't cause unnecessary confusion around which code is what.</p>
<script charset="utf-8" src="http://feeds.feedburner.com/~s/user?i=http://adam.goucher.ca/?p=635" type="text/javascript"></script>