Skip to content. | Skip to navigation

Personal tools
You are here: Home Help Center How-tos Subversion
Document Actions

Subversion

Subversion (SVN) is a tool to manage code and code revisions. We use it at UofL. If you have access to write to the repository, here's some tips on how to use it.

Purpose

If you're writing code for IT's web group (application development group), you should be using a code revision control and management system.

Prerequisities

You'll need either a subversion client, or have installed the subversion client software on the *nix or linux system where you're working. This doc covers using svn on a unix system.

Step by step

Create a repository in subversion
===========================================================

In this example, we'll create a repo for PloneFormGen.
Make a copy of /web/src/blankrepos/productname for your product. 

    cp -rf /web/src/blankrepos/productname ./PloneFormGen

This will be a temporary directory structure to setup your initial 
import. You'll delete this later.

Copy your source files into ./trunk/ 
    cd ./PloneFormGen/trunk
    cp -rf /path/to/source/PloneFormGen/* ./
    
Create the repo and add the directories.
    cd ../
    svnadmin create /web/svn/repos/PloneFormGen
    svn import trunk  file:///web/svn/repos/PloneFormGen/trunk -m"initial import" 
    svn import branches  file:///web/svn/repos/PloneFormGen/branches -m"initial import" 
    svn import tags  file:///web/svn/repos/PloneFormGen/tags -m"initial import" 

Delete your temporary copy now that you're done.



To create a branch:
===========================================================
Checkout the code:
    svn co https://svn.dev.louisville.edu/PloneFormGen/trunk PloneFormGen

Make a copy, then commit:
    svn copy trunk branches/1.2-RC2-uofl-thanks-template
    svn commit -m"branching to create a thanks page version of PFG" 


To create a tag:
Working on trunk, you'll eventually get to a point where you'll want 
to tag it as a release iteration. 
    
    svn copy trunk tags/1.2-RC2
    svn commit -m"tagging as 1.2-RC2 release"

or, another way:...
    svn copy https://svn.dev.louisville.edu/PloneFormGen/trunk  \
        https://svn.dev.louisville.edu/PloneFormGen/tags/1.2-RC2  \
        -m"tagging as a 1.2-RC2 release candidate."
        


Further information

references: