Saturday, October 30, 2010

Local SVN Repositories

We all know that SVN is an incredibly handy tool while developing.  Remember that brilliant idea you had at 3 a.m. last night that you implemented and it completely screwed up the program?  SVN does.

Sadly getting SVN repositories is, quite frankly, a hassle when your program is small and you don't want to share it with the world yet.  Google Code takes ten or fifteen minutes to set up, Sourceforge takes a few days for your project to be approved, and they don't work on weekends.  Then what about checking out when you are out of range of the Internet?

I do know that setting up a dedicated server for your personal SVN is a pain, plus you will need to back up the server on a regular schedule, keep it connected to the Internet, secured, and working through your NAT/Firewall, and pay for the electricity it uses.

Materials:
  • Subversion 
Procedure:
  1. Install Subversion sudo apt-get install subversion
  2. Make a new folder for the subversion repositories in your home directory, I named mine svn_repository , remember explicit is better than implicit.
  3. Use the svnadmin command to create a new repository for your project like so: svnadmin create ~/svn_repository/my_project
  4. Now you can check out your project using the file path as the URL.  svn co file:///home/username/svn_repository/my_project ~/my_project_working_copy

No comments:

Post a Comment