This is just a little post to help me remember how I got this stuff working.
Subversion is a revision control system that is being developed to replace older similar systems. Revision control lets you update your projects in an iterative fashion and allows you to keep track of these changes. This is perfect for when you have a bunch of people working on the same thing and want an easy way that everyone can work on the same stuff without stepping on other peoples toes.
I have used version control systems on a Java application we developed as a team last semester, and I plan on using it soon to develop web applications, but it really could be used for almost anything: a big proposal, documents for a conference, anything that you might work on in a step-wise fashion.
Plus, it doesn’t have to be a group project to use Subversion. You can use it as an easy backup system so you can work on your stuff from any machine and use it in case you want to revert to an earlier version of something.
If you have the server set up, using a client to check-in and check-out projects is easy. For Windows there is a client called tortoisesvn that comes highly recommended. I guess it integrates with Windows Explorer to make things easy. For Mac you can use a precompiled command-line version (this one is the most popular and put out by Martin Ott of SubEthaEdit fame) or search for a GUI version. My favorite so far has been ZigVersion. SvnX is also recommended, but froze up when trying to connect to my server (probably because I was initially typing the location wrong).
This is the tricky part. The easiest way to install it on a Mac that I’ve found is using Darwinports and this tutorial. I followed it excatly without any issues. Darwinports is so handy, everyone should have it installed by now. Then I used this section of the book to add basic authentication to my Subversion repository.
Now to add a new repository I simply use:
sudo mkdir reposName
sudo svnadmin create –fs-type fsfs reposName
make template and import
mkdir trunk branches tags
Import your template directory into the “reposName” repository using
svn import .http://localhost/svnrepo/reposName -m “Initial import.”
And you should be ready to go. Here’s a list of commands from the book commonly used in messing with the repository:
- Initial Checkout
- svn checkout http://name.of.host/rep/path
- Update your working copy
- svn update
- Make changes
- svn add
- svn delete
- svn copy
- svn move
- Examine your changes
- svn status
- svn diff
- svn revert
- Merge others’ changes into your working copy
- svn update
- svn resolved
- Commit your changes
- svn commit
So that brings together most of what you would need to set up a Subversion server on a Mac, and mess with it. Hope this can help somebody