Skip to content

Rhaptos Software Development

Personal tools
You are here: Home » Documentation » Developer Documentation » SVN Basics

SVN Basics

Document Actions
Introductory information and commands for using Subversion (SVN) for Connexions development

All text within <> should be replaced with an actual value.

Basic Information

URL for repository

  •  https://software.cnx.rice.edu/svn

Subversion Commands

Devsets

 Create a devset
  •  svn mkdir https://software.cnx.rice.edu/svn/devsets/<devset_name> -m '<your devset description here>'
    • -m on most commands prevents svn from opening vi to allow you to edit the message.  If you want to use vi, remove the -m from the examples
    • Devset names should be similar to the Milestone they are associated with
    • Use - to separate words in devset names, not spaces
      • Example: attribution-policy

Adding externals.txt to a devset

  • Check out the devset
    • svn co https://software.cnx.rice.edu/svn/devsets/<devset name> <path/where/you/want/devset/checked/out>
  • If you are not already there, cd to the location of the checkout devset
    • cd <path/to/checked/out/devset/>
  • Create externals.txt file via an editor of your choice
    • See attached example
    • Save file in same location as devset
    • The branches listed must exist on the products listed in externals.txt
  • Set externals property
    • svn propset svn:externals . -F externals.txt
  • Add externals.txt and commit
    • svn add externals.txt
    • svn commit -m '<your commit message here>'
Updating externals.txt
  • cd to devset location
    • cd <path/to/checked/out/devset/>
  • Modify current externals.txt in the editor of your choice
  • Save file in current location
  • Reset externals property and commit
    • svn propset svn:externals . -F externals.txt
    • svn commit -m '<your commit message here>'

Commiting a devset

  • cd to the location of the devset
    • cd <path/to/checked/out/devset/>
  • commit to svn
    • svn commit -m '<your commit message here>' *
Updating a devset
  • cd to the location of the devset
  • svn up

Comparing a devset between svn and local copy

  • cd to the location of the devset
  • svn status

Branches

Creating a branch from trunk
  •  svn cp https://software.cnx.rice.edu/svn/<Product Name>/{trunk,branches/<branch name>} -m '<description of branch goes here>'
    • Product Name is the product you are creating the branch on
    • Branch names should be the same or similar to the devset name they are associated with
    • Use - to separate words in branch names, not spaces
      • Example: attribution-policy
  • Once you create a branch, you should initialize svnmerge

Creating a branch from another branch

  • svn cp https://software.cnx.rice.edu/svn/<Product Name>/branches/{<branch to start from>, <new branch name>} -m '<description of branch goes here>'

Checking out a branch

  • svn co https://software.cnx.rice.edu/svn/<Product Name>/branches/<branch name> <path/where/you/want/branch/checked/out>

Deleting a branch

  •  svn rm https://software.cnx.rice.edu/svn/<Product Name>/branches/<branch name> -m '<your message goes here>.'

Files

Checking in files
  • cd to file location
  • svn ci <file name> -m '<your commit message here>'
    • No need to cd to location if you enter the full path to the file
    • ci is a shortcut for commit (check in)
    • Multiple file names can be entered separated by a space
      • svn ci <file name1> <file name2> <file name*> -m '<your commit message here>'
Created by ew2
Last modified 2008-07-17 08:43