Subversion How To

This is s brief "How to" for the subversion repository hosted on kingkong. Note that all of this is in detail in general in the subversion online book at http://svnbook.red-bean.com/, especially http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.tour.cycle.

Initial Download

$ svn checkout http://kingkong.amath.washington.edu/svn/hpsc09

...
Checked out revision 2.

This will checkout the entire source tree from the subversion server.

Updating

From inside the directory hpsc09 (or any subdirectory):

$ svn update

Will bring more recent versions from the repository.

Modifying and committing

This won't be needed for this repository, but for a repository you have commit-permission for, here is an outline of the basic work flow:

  • Update your working copy: svn update
  • Make changes: svn [add, delete, copy, move]
  • Examine your changes: svn [status, diff]
  • Undo changes if necessary: svn revert
  • Resolve Conflicts (Merge with ithers' changes): svn [update, resolved]
  • Commit your changes: svn commit -m "Your comment here"

Detailed Steps

2) Modifying source locally:

Use the add, copy, move, delete to modify the local repository and keep track of changes. Note that you must be in the repository directory structure in order for it to know which trees you want updated.

$ svn update

$ svn add foo.f
$ svn delete foo.f

3) Status of local modifications:

Will tell you what changes have been made to the local repository and what will be committed. Always do this before committing so you know what is going to occur!

$ svn status

You can also always revert all changes that you have made by using the svn revert command.

4) Commiting to the general repository:

$ svn commit -m "fixed bug..."