My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
Accessing_Subversion_Repository  
Instruction on using SmartSVN to Connect to the FDS-SMV SVN repository.
Featured, Phase-Deploy
Updated Oct 18, 2011 by mcgra...@gmail.com

Introduction

Google Code uses Subversion (SVN) for version control. Subversion is widely considered as an improved versioning method over CVS. This Wiki page provides instructions on using a browser called SmartSVN or the command line to obtain files from the FDS-SMV SVN Repository.

Using SVN via the Browser SmartSVN

SmartSVN is available as freeware. A for-purchase version of SmartSVN is available that has additional capabilities, but for most users the free version will suffice.

Adding the Repository to SVN

  • After installing SmartSVN, launch the program.
  • The program will open with a Welcome to SmartSVN window. Select Check out project from repository.
  • A Check Out Project window will open. Select Manage
  • A Repository Profiles window will open. Select Add
  • An Add Repository Profile window will open.
    • Select HTTP for the protocol for anonymous check-out, or HTTPS if you have commit privilege.
    • In the Server Name box type fds-smv.googlecode.com
    • In the Repository Path box type /svn/trunk/FDS/trunk
    • Click Next
    • Select Anonymous for the SVN Login or type in name and password if you have commit privilege
    • Click Next
    • If you desire to see something other than the URL in Check Out Project window select Use This Profile Name and enter a name. 'FDS-SMV' would be suitable here.
    • To check out the code follow the instructions in the next section.

Obtaining Files

The First Time

Once a project has been added to the repository it can then be checked out.

  • After launching SmartSVN, select Check out project from repository
  • A Check Out Project window will open. Using the drop down box select the FDS-SMV repository.
  • Click Next
  • SmartSVN will scan the repository in display a directory tree. The folders in the tree can be opened and closed with the plus/minus buttons.
  • Expand the FDS folder, then select the 'trunk' folder under it.
  • Click Next
  • Type in or browse a Local directory where the files will be stored on your computer.
  • Click Next

At this point, the entire FDS-SMV project will be copied from the repository to your computer.

After the First Time

  • After launching SmartSVN, select Open Existing project(s):
  • Select the Project Name you wish update
  • Click OK
  • You can now select either a file or a subdirectory and click the green arrow to update your local files from the repository.

Using SVN at the Command Line

If you have SVN command line client installed, you can check out the FDS/SVN repository using the command line version of SVN.

You can download the command line client for your platform here: http://subversion.tigris.org/project_packages.html

Open a terminal/shell session and change to the directory that you want the FDS-SMV project folder to be placed within. We recommend that you be in your home directory.

Anonymous Checkout

If you are not a member of the FDS-SMV development team, then type:

svn co http://fds-smv.googlecode.com/svn/trunk/FDS/trunk FDS-SMV

Note the use of "http" for an anonymous checkout. If you want to check out an older version of the repository or you want to only check out part of the repository, there are options for doing so. For example, to check out only the Validation folder for SVN number 7031, do this:

svn co -r 7031 http://fds-smv.googlecode.com/svn/trunk/FDS/trunk/Validation FDS_Validation_7031

Note that the new directory called FDS_Validation_7031 will appear in the present working directory. There is nothing special about the name you choose, but it is recommended that you do not use blanks in the name.

Developer Checkout

As a member of the FDS-SMV development team with commit privileges, type:

svn co https://fds-smv.googlecode.com/svn/trunk/FDS/trunk FDS-SMV --username [your developer username]

Note the use of "https" for a developer checkout. Also, your developer username is often the same as your gmail address.

You will be prompted for your password, but this is NOT the password for your Google Account, this is a special Google Code password that you can find through a link under the "Source" tab of the Google Code fds-smv project site. It will be a random bunch of numbers and letters and nothing that you can specify. NOTE: the link will not be available unless you are a Project Member or Owner.

Either way, a directory called FDS-SMV will appear in the directory where you executed the checkout command (the 'co' part of the string), with the contents of the FDS-SMV repository contained within.

Updates

To update your local copy of the repository, go to the sub-directory that you want to update (FDS-SMV in the example above) and type:

svn update

NOTE: This could be used to update any of the sub-directories under FDS-SMV. If you change down to a subdirectory, like 'FDS_Source' and execute the svn update command, only that directory will be updated.

If you want to return to an older version, type:

svn update -r 1234

where 1234 is the SVN number you want to return to. If you want to get back to the latest, just redo the svn update without the -r.

Change or Commit Log

To obtain a log of transactions for that particular sub-directory, type:

svn log -r N:M > text_file.txt

Which will record all transactions from SVN revision N to M in the file text_file.txt By switching the order of the revision numbers you can sort the log in ascending or descending order by revision number.

Status

To see which local files are different from those in the Repository, type:

svn status | grep -v '?'

This is a very useful command. If you first do an svn update and then the status command, you will know what is different on your system. It is a good habit to do this at the start and end of the day. Try to avoid having too many modified files on your system.

Info

To find out repository details such as the revision number or who made the last change use the svn info command.

For example, cd'ing into the Verification directory and typing svn info results in the following output:

Path: .
URL: https://fds-smv.googlecode.com/svn/trunk/FDS/trunk/Verification
Repository Root: https://fds-smv.googlecode.com/svn
Repository UUID: d1fd391b-682f-0410-ad1c-43d0e10d2734
Revision: 4274
Node Kind: directory
Schedule: normal
Last Changed Author: mcgratta
Last Changed Rev: 4246
Last Changed Date: 2009-06-25 16:42:34 -0400 (Thu, 25 Jun 2009)

Edit Existing Commit Log Entry

To edit an existing commit log entry (developers only):

svn propset -r N --revprop svn:log "[new log message]" https://fds-smv.googlecode.com/svn/trunk/FDS/trunk/ --username [dev. username]

This will replace the log entry for SVN revision N, with the text placed in quotes. Note, this command will prompt for your GoogleCode password, which is the password in your profile, and not your Google Account password.

Notes on Installing Subversion on a Linux Machine

These notes explain how we downloaded and installed Subversion on the Linux cluster at NIST. The notes should also work for OSX on a Mac but have not been tested there yet.

  • Download both the subversion source (eg. subversion-1.6.11.tar.gz) and the subversion dependencies (eg. subversion-deps-1.6.11.tar.gz ) from the Subversion source page. Copy downloads to /tmp
  • cd to /tmp and type:
  1. gunzip subversion-1.6.11.tar.gz
  2. gunzip subversion-deps-1.6.11.tar.gz
  3. tar xvf subversion-1.6.11.tar
  4. tar xvf subversion-deps-1.6.11.tar
  • cd to /tmp/subversion-1.6.11
  • type: ./configure --with-ssl
  • type: make
  • become root and type: make install

Note: This Subversion package is installed in /usr/local/bin . The Subversion package that was installed with Fedora is installed in /usr/bin which takes precedence. To use the new Subversion package, either 1) the new one must be installed in /usr/bin, 2) the old one must be uninstalled, or 3) the new one must be renamed (i.e. SVN rather than svn). For now, we are taking option 3.

Powered by Google Project Hosting