Short summary of useful commands

Getting started :

1 : See article 147

2: Web access (for the visualization of the code only) : (see here for access)

3 : store your svn passwd in your computer (to be done after the first checkout of the code):

  • edit $HOME/.subversion/config
  • uncomment the line # set store-passwd = no and replace "no" by "yes" (do not leave a space at the beginning of the line)
  • NB: the directory .subversion is created only after a first SVN command has been launched

4 : create a directory (e.g. $HOME/SURFEX_SVN) on your PC to store the code

Get different versions of the code from the svn repository

Go to your local SVN directory ($HOME/SURFEX_SVN), and...

  • Get the latest version from the trunk :

svn co

  • Get the code from the 7.1 official release :

svn co

  • get the code from a specific branch :

svn co

  • Get the project at a given number of revision (Each operation in the SVN repository is associated with a revision number to get a specific revision number code):
    svn co -r [revision number]

Create your own branch on svn server:

  • from the last trunk version:
    svn copy -m "branch of intel"
  • from a specific revision of svn:
    svn copy -m "branch of untel" -r [num of revision]

Send modifications to the SVN server:

  • copy your modified files in SVN directories, following the SVN tree
  • go into the directory of the branch for which you want to send modifications and do:
    svn commit -m "description of modifications"
  • NB: you can also specify a specific directory of file in the call of svn commit:
    svn commit file -m "description of modifications"
    svn commit dir -m "description of modifications"

Other SVN commands:

  • svn add file.F90 + svn commit -m "..." => adds a file
  • svn delete file.F90 + svn commit -m "..." => deletes a file
  • svn copy file.F90 file2.F90 + svn commit -m "..." => copies a file
  • svn move file.F90 file2.F90 + svn commit -m "..." => moves a file
  • svn mkdir rep + svn commit -m "..." => makes a new directory