My lil Subversion Jumpstart tutorial

I'll keep it short.

  1. Get Subversion from http://subversion.tigris.org Get the binary packages for your OS for ease of installation. approx 3MB
  2. Get Mike Clark's book .

I'll just note down some of the things that I do when I set up a SVN box on my WinXP machine.

  • Run the install or unzip the zip to the [SubversionFolder] e.g. d:/subversion
  • Modify the PATH environment variable so that it includes [SubversionFolder]/bin. You can verify this via the command prompt
>svn --version
svn, version 1.4.5 (r25188)
compiled Aug 22 2007, 20:49:04
  • Create the repository. To create a repository in D:\CoderZone\svn-repos - assuming that d:\CoderZone exists
>svnadmin create /CoderZone/svn-repos
  • Now you can import a dump file e.g. if you are migrating between machines / subversion versions. e.g. if I had created a dump file from the source repository and load it into the new repository as shown below. (If you get an error like svnadmin: Expected format '3' of repository; found format '5' make sure that you dont have the old version of svnserve running. Close the process and create the repository again)
>svnadmin dump D:\CoderZone2\svn-repos > ReposDump.dmp
>svnadmin load D:\CoderZone\svn-repos < ReposDump.dmp
  • You start the subversion daemon like this
>start svnserve --daemon --root d:\CoderZone\svn-repos
  • Next we import a folder like this. e.g. if we want to check in contents of c:\work
c:\work
>svn import -m "First Check-in" svn://[SubversionRunningMachine]/[ProjectName]/trunk
  • That's it we can now checkout the contents of our project to a folder name Work2 like this
>svn co svn://[SubversionRunningMachine]/[ProjectName]/trunk Work2
  • I can add a new file to version control and check in modifications to already versioned files with
>svn add Data\templateData.xml
>svn commit -m "First Change!"

No comments:

Post a Comment