From csdms

Source code version control: Subversion (svn)

Contents


CSDMS uses Subversion (svn) as software version control system to provide access for those who want to share their model source code while it is in development through the CSDMS model development repository. Svn keeps track of current and historical versions of source code. You need a client version on your computer to either up- or download model source code. Use this link to download the official command line Subversion client. A complete manual is online available: Version Control with Subversion. We strongly encourage you to read the manual if you have write access to the CSDMS servers.

Presentations

  • S. Peckham, 04/17/07: "Mini-tutorial on Subversion".
    The following document is a "mini-tutorial" on how to perform common tasks with a popular version-control system called Subversion. Subversion provides a powerful and convenient method of tracking changes made to an arbitrary set of files and is particularly useful for large software development projects that involve multiple authors.
    PDF version

Is svn the right tool for you?

CSDMS makes svn available for all model developers. Model developers (those who have svn server write permissions) can upload their source code or source code contributions and share it with other developers. In that way a group of developers can for example work on the same model without worrying about different model versions. Users can download source code by searching the right model on the model description pages (Model download portal) or by going directly to the model download page (Download a model). Each contributed model to CSDMS will be add to the SVN repository.

Get a CSDMS-svn login

Do you want to upload your model source code to the CSDMS model repository? Don't hesitate, email (CSDMS@Colorado.edu) or phone us (see Contact_us) and we'll set you up. People don't need a log in to download source code. A log in is only required for uploading your model.

Check out models (anonymous)

You can access the CSDMS svn repository anonymously, via regular HTTP if you don't have an login.

To check out any of the models in the CSDMS repository use the next command:

svn checkout https://csdms.colorado.edu/svn/<Model REPOSITORY NAME>

Commit models (as developer)

Upload changes

If you are happy with the changes you have made to the code and you want to commit them for others to see, use:

svn commit <altered file> -m <useful message>

A few things to remember before committing changes:

  • Please, at the very least, make sure that the changes you made are an improvement to the code. If the code compiled, make sure it still compiles.
  • Make sure the <useful message> is, well, useful.

Some other useful commands

Below you might find some useful commands. Make sure to read more about how to apply those commands in the svn manual as each command has it is own set of parameters for specific functionality.

  • Update your working copy

To update your copy, make sure you are in the directory where your code is and use the following command:

svn update
  • Create diff

Create a text file which shows all the changes done in the working copy compared to the repository:

svn diff
  • Check the status of your working copy

To check the status of your working copy:

svn status
Personal tools