Skip to content

SubversionRepository

Oliver Beckstein edited this page Apr 5, 2015 · 1 revision

Until 2011-11-28, the source code was stored in a subversion repository but was converted to git. The SVN repositoryrepository still exists and is full accessible, using any of the instructions in this section. However, all development is done in the git repository using git.

DO NOT USE THE svn REPOSITORY — see the notes on the git repository instead.

Below are some of the old notes on how to use the repository (geared towards developers).

Subversion

Subversion (svn) is the native (though somewhat limited) format for the MDAnalysis repository. Follow the Source Checkout Instructions.

Note that the password that svn asks for is not your gmail password but the googlecode.com generated one.

git-svn

git is a very modern, distributed source code management system. There are advantages to using it, even in conjunction with a svn repository.

Quick notes on how to this with googlecode:

First make a file to translate commitor names to persons:

cat >AUTHORS.txt <<EOF
oliver = Oliver Beckstein <[email protected]>
orbeckst = Oliver Beckstein <[email protected]>
denniej0 = Elizabeth Denning <[email protected]>
[email protected] = Elizabeth Denning <[email protected]>
naveen.michaudagrawal = Naveen Michaud-Agrawal <[email protected]>
nmichaud = Naveen Michaud-Agrawal <[email protected]>
root   = Oliver Beckstein <[email protected]>
Danny.Parton = Danny Parton <[email protected]>
philipwfowler = Philip Fowler <[email protected]>
tyler.je.reddy = Tyler Je Reddy <[email protected]>
[email protected] = Tyler Je Reddy <[email protected]>
joseph.goose = Joseph Goose <[email protected]>
jandom = Jan Domanski <[email protected]>
EOF

Clone the repository; this takes a while but only has to be done once:

git svn clone -A AUTHORS.txt --stdlayout --username USERNAME https://mdanalysis.googlecode.com/svn mdanalysis

This will pull in the whole change history and build a git repository.

Typical svn-like use:

git svn rebase       # pull changes from svn repository = "svn update"

# edit FILE1 FILE2 ...

git status           # show changes (svn status)

git add FILE1 FILE2  # add (svn add) or mark files for inclusion in next commit (-/-)

git commit -m "fixed the flux-flobberer"  # commits LOCALLY in git

# ... do more work locally, add, commit

# finally, upload changes to googlecode
git svn dcommit      # all changes since rebase are uploaded (svn commit)

You can then git to make local branches, rewrite local history etc. Just follow some simple rules:

  • The git "master" should correspond to the svn "trunk".
  • Do not git-merge any branches that are in the svn repository. Only merge local branches into the master (trunk).
  • Do not clone the git repository itself. Always git svn clone the googlecode svn repository; otherwise odd things might happen.
  • Use git-cherrypick to port patches from one svn branch to another (e.g. port last-minute fixes from release branches to trunk).
  • Use git svn dcommit -n to check that you are submitting to the correct branch.
  • Only rewrite local history (git-rebase); local means anything that has not appeared in the googlecode repository yet (i.e. before a git svn dcommit).

Post questions and comments below.

Clone this wiki locally