CIG > Community > Developer > Software Repository > Using Subversion
Personal tools

Using Subversion

CIG software is available via the Subversion version control system, rather than CVS. Anyone can check out the code; however, only CIG developers can check it in.

If the below information does not address your question or problem, e-mail us at cig-help at geodynamics.org

Checking Out

To check whether you have a subversion client installed on your machine, type:

    svn

You should get a response that looks something like this:

    Type 'svn help' for usage.

Otherwise you will need to download and install a Subversion client, available at http://subversion.tigris.org/project_packages.html

After installing the client, you will be able to retrieve CIG software and create a copy of the repository on your local machine. The main repository is located at:

    http://geodynamics.org/svn/cig

As of May 2009, it has the following structure (note "doc" path; eventually all development documentation for the manuals will be housed in this tree):

    /cs
      /autoconf
        /trunk
      /avm
        /trunk
      /benchmark
      /buildbot
        /trunk
      /cgi
        /upload-papers.py
      /cigma
        /branches
        /tags
        /trunk
      /cigtg
        /branches
        /tags
        /trunk
      /Exchanger
        /tags
        /trunk
      /ez_setup
        /README.txt
        /__init__.py
      /merlin
        /branches
        /tags
      /nemesis
        /tags
        /trunk
      /plot-user-map
        /trunk
      /portal
        /trunk
          /hello
          /magportal
          /seismo
      /pyrexenbed
        /trunk
      /pythia
        /tags
        /trunk
      /pythiautil-0.6
        /branches
        /trunk
      /regresstor
        /branches
        /tags
        /trunk
      /scons
        /scons-local-0.96.92
        /scons.py
        /sconsign.py
      /spatialdata-0.1
        /branches
        /trunk
      /spike
        /branches
        /trunk
      /stats
        /trunk
    /doc
      /cigma
        /.tags
        /manual
      /CitcomS
        /manual
      /snac
        /figures
    /geodyn
      /3D
        /MAG
          /branches
          /tags
          /trunk
        /MoSST
          /branches
          /tags
          /trunk
    /long
      /2D
        /plasti
          /tags
          /trunk
      /3D
        /Gale
          /branches
          /tags
          /trunk
        /SNAC
          /trunk
    /magma
      /3D
        /SpecRidge
          /trunk
    /mc
      /1D
        /hc
          /tags
          /trunk
      /2D
        /ConMan
          /branches
          /tags
          /trunk
      /3D
        /CitcomCU
          /branches
          /tags
          /trunk
        /CitcomS
          /branches
          /tags
          /trunk
        /ellipsis3d
          /tags
          /trunk
    /seismo
      /1D
        /mineos
          /tags
          /trunk
        /SPECFEM1D
          /trunk
      /2D
        /SPECFEM2D
          /branches
          /trunk
      /3D
        /ADJOINT_TOMO
          /flexwin
          /flexwin_paper
          /iterate_adj
          /measure_adj
          /mtadj
        /CPML
          /trunk
        /GEOCUBIT
        /GRD_CMT3D
          /cmt3d
          /grid3d
          /scripts
        /SPECFEM3D_CUBIT
        /SPECFEM3D_GLOBE
          /branches
          /tags
          /trunk
        /SPECFEM3D_SESAME
          /branches
          /tags
          /trunk
    /short
      /2.5D
        /benchmarks
      /3D
        /EqSim
          /branches
          /trunk
        /lithomop
          /branches
          /tags
          /trunk
        /PyLith
          /benchmarks
          /branches
          /papers
          /tags
          /trunk
    /vendor
      /buildbot
        /current
        /v0.7.5
      /django
        /current
        /v0.95.1
        /v0.96
      /elsa
        /2007-04-14
        /current
      /ez_setup
        /current
      /pythia
        /current
        /v0.0
        /v0.1
        /v0.2
        /v0.3
        /v0.4
        /v0.5
        /v0.6
        /v0.8
      /Python
        /current
        /v2.5.1
      /setuptools
        /current
        /v0.6c3
        /v0.6c8
        /v0.6c9

You can independently check out any of the subdirectories. So, if you are interested in checking out just the main line of development of Exchanger, you would use:

    svn checkout http://geodynamics.org/svn/cig/cs/Exchanger/trunk 

This creates the "trunk" directory and its files in the directory where you are running the svn command. To put the files somewhere else, specify a path, e.g.,:

    svn checkout http://geodynamics.org/svn/cig/cs/Exchanger/trunk /User/sue/workarea

Updating your copy of the repository

This is done with:

    svn update

Developer Checkout

If you are authorized to edit the repository (i.e., you have an account and your computer's public key has been generated and submitted), check out the directory tree containing the files to be edited by using the checkout command ("checkout" or "co"):

   $ svn co svn+ssh://svn@geodynamics.org/cig/[path] [target dir]

For example:

   $ svn co svn+ssh://svn@geodynamics.org/cig/long/3D/Gale/trunk/documentation gale-docs

This creates the directory "gale-docs" on your local machine, then checks out the source directory "documentation" and all its subdirectories into "gale-docs" for you to edit.

Developer Check in or Commit

To check in the changed file(s) to the repository, navigate to the top directory where your changed files reside and use the svn commit command ("commit" or "ci") to send all of your changes to the repository. Any file that is changed will be checked in at the same time. When you commit a change you need to provide a message describing your changes, which will be logged. Here's an example:

    $ cd gale-docs
    $ svn ci --message "Updated images"

Adding Files

To add files, the new files must be in the checked-out directory on your local machine with the other files already under svn control. First you use the svn command "add" and then you "commit" your changes. For example, to add newfile.pdf:

    $ svn add newfile.pdf

A message will appear saying that the file will be added at the next commit. You can expedite the process by running commit:

    $ svn commit --message "added newfile.pdf"
    Adding         newfile.pdf
    Transmitting file data ...
    Committed revision 4268.

Your new file has been successfully added.

Merging Two Different Revisions

If more than one person are editing a document, before you commit changes, run "svn update" first to merge any changes made since you obtained the copy you are working on (see below; "G" means the merge was successful). Then run "svn commit" to upload the merged document:

     $ svn update 
     G    manual.lyx
     Updated to revision 889.
     $ svn commit -m "added figure"
     Sending        manual.lyx
     Transmitting file data .
     Committed revision 890.

More information and details on using Subversion can be found in the svnbook

Troubleshooting

If you have any questions about building or running the various codes, you should send a message to the appropriate mailing list (cig-cs, cig-geodyn, cig-long, cig-magma, cig-mc, cig-short, or cig-seismo). cig-cs is also the place to send messages if you have general issues (e.g., the repository does not seem to be available).

Document Actions