Subversion Setup

This was originally posted on my family blog on 2/2/06. I will be slowly moving the geeky stuff from there to this blog.

No, I'm not talking about how to overthrow the government. This is how I set up subversion repositories on my Linux box. I got most of this form the subversion book. I'll try to link to the specific parts of the book where each part came from.

First, create the repository using fsfs for the database, because I heard it's way cooler than Berkeley db. Seriously (no really, I wish I had a better reason, I read something that I found on Google somewhere that it was).

svnadmin create --fs-type fsfs /path/to/repos/project

Next, set up the project directory tree to be imported. I'm using what seems to be the standard setup with trunk, branches, and tags sub-directories, as somewhat explained in the section on using branches in the svn book.

mkdir project
mkdir project/tags project/branches project/trunk
cp -r /path/to/work/in/progress/* project/trunk/

Lately it's a python project I'm putting into subversion so I remove the .pyc files, they don't go under revision control so one more step:

find project/ -name "*.pyc" | xargs rm

Now import it:

svn import project file:///path/to/repos/project -m "initial import"

See that it worked:

svn list file:///path/to/repos/project

To really make sure it worked, check out the project somewhere else:

cd /tmp
svn checkout file:///path/to/repos/project/trunk project

And that's it, as long as you only want local access. I've set up network access through Apache and I need to write that up too (before I totally forget).


Popular posts from this blog

SystemVerilog Fork Disable "Gotchas"

Git Rebase Explained

'git revert' Is Not Equivalent To 'svn revert'