Svn

Switching from SVN to git

3 min read

I’ve been using SVN for several years now, so I’ve been partial to it, and reluctant to switch to another form of source control. I’m very comfortable with it, and I’ve got dozens of scripts to augment it and help me deal with it’s shortcomings, as well as a few blog posts.

  • Easier to create a repository from existing code.

This is the first thing I noticed about git that absolutely crushes subversion. With subversion, you have a repository that you check files out of. With git, you can literally create the repo while you’re in a directory.

git svn
Read more

Problems Installing Subversion From Source On CentOS

2 min read

I was setting up a new server for someone, and encountered this error while I was trying to build svn

/usr/bin/ld: cannot find -lexpat

Now, while I can do some things on that a sys admin can, I am by no means a sys admin. I have only installed svn a handful of times, and I didn’t know what this was.

First I installed expat from source. It didn’t help.

linux svn
Read more

Using SVN to Manage a Website

1 min read

We’ve tried several ways of using SVN to manage Answerbag. Here’s a brief overview.

  1. We work out of the trunk for very small projects (under a few hours)

  2. We create branches to deal with larger projects, and merge those changes back into the trunk when they are done and tested.

  3. When we do a code push, we always push a branch called “production”. When it’s time to push, we run a script called “mkprod” that will rename the existing production branch, and create a new production branch off of the trunk. We then export that branch and push it to each of our web servers.

    svn
    Read more

Helpful SVN Script For Adding all Unknown files to Repository

1 min read

I use SVN from the command line a lot. I also hate typing things over and over. I wrote this script to add all files to a repository that are not already in there.

svn status | awk '{if ($1 == "?") print $2 }' | xargs svn add

I have this saved in my ~/bin folder as “addall”, which I’ve added to the $PATH variable, which gets set in ~/.bash_profile

svn tips
Read more

How to roll back commits to an earlier version of a repository in SVN

1 min read

I’ve always wanted to know how to do this, and for some reason I always had a hard time finding out how. I needed to rollback a change I had committed to my SVN repository.

The way you rollback to an earlier version of your repository is to do a reverse merge.

Here’s the example off the SVN site. It will do a reverse merge, and roll back the commit you made in version 303.

svn tips
Read more