OMII-UK Home

The OMII-UK Subversion repository is a new service comprised of 2 new repositories which have been designed to replace the old CVS and BSCW services. Subversion (SVN) can also in part be accessed from outside the Southampton office, so parts of the repository can be shared with other members of OMII-UK and OMII-Europe. SVN clients are available for most platforms, visit http://subversion.tigris.org/ for more details.

Accessing the repository requires a user account to be created. (Most of the members of the OMII-Southampton office already have these, they are the same as their ECS username.) To apply for an account, email systems@omii.ac.uk if you a member of the OMII-UK team, else contact support@omii.ac.uk. In addition to this, the document repository can only be accessed from the local (OMII or ECS) networks.

Once you have an account you can browse the respository via ViewVC, http://svn.omii.ac.uk/cgi-bin/viewvc.cgi/svn/ for code and http://svn.omii.ac.uk/cgi-bin/viewvc.cgi/doc/ for documentation Or you can look at the repository directly via, http://svn.omii.ac.uk/svn/ and http://svn.omii.ac.uk/doc/ (access restrictions may apply, depending upon the user groups you belong to).

This latter interface is the same as a Subversion client communicates with. So for instance, if you are going to check out the OMIIWeb portion of the repository you could use:

svn checkout --username=<your-username> http://svn.omii.ac.uk/svn/trunk/OMIIWeb

Or if you wanted to check out the User Documentation you could use:

svn checkout --username=<your-username> http://svn.omii.ac.uk/doc/trunk/User%20Documentation/

You will be prompted for your password, before the checkout starts. Most SVN clients will cache your user credentials, so you don't have to keep entering them. NB, some SVN clients store your username and password details in plain text on your system, so it is advisable not to use the same password as other accounts you may use.

There are more friendly, graphical Subversion clients available at tigris.org, if you don't like command lines.

You can change your password by visiting: http://svn.omii.ac.uk/cgi-bin/admin/change_password.cgi Visit this page, log in using your username and existing password, then enter your new password, then submit.

Committing changes back to Subversion is very similar to the previous CVS system. You will need write privileges added to your user details, when commiting you must include a reference to a Bugzilla bug id, eg.

svn commit -m "BugId: 1234 - your message here" myfile.txt

If you need to add a new document to the repository ensure you have a copy of this document in your local working directory of the repository area you want to add too. Then you need to import this new document.

svn import my_new_file.txt --username=<your-username> -m "BugId: 1235 - your message here" http://svn.omii.ac.uk/svn/trunk/OMIIWeb/my_new_file.txt

You can now checkout, modify and checkin this new document as required.

If you are outside the Southampton office, please agree a bug id to be used with someone from the Southampton office.

In addition to the interfaces described above, there is also a simple search interface to help locate documents within the new document repository. http://svn.omii.ac.uk/cgi-bin/admin/search_doc.cgi will by default return a list of all available documents, this list can be filtered by search terms being entered into the form.

Advanced Usage

Merges

In subversion, a merge operation can be described simply as:

  • Check out a working copy representing the target of the merge
  • Take the difference between two points in the revision tree
  • Apply that difference to the working copy
  • Fix up conflicts in the working copy
  • Check the working copy back in

When doing a merge between two branches (i.e. unstable trunk to a stable branch), the first operation checks out the target of the merge -- the HEAD revision of the stable branch in the example. The second part selects the revisions on the unstable trunk -- typically from the last merge point up to HEAD.

So, if we are merging from the trunk at http://svn.omii.ac.uk/svn/trunk/ onto a stable branch at http://svn.omii.ac.uk/svn/branches/Test-Stable-Branch/, and the last time we did this merge was at revision 1729, then we would do the following:

$ svn checkout http://svn.omii.ac.uk/svn/branches/Test-Stable-Branch/ Test-Stable-Branch_merge
$ svn merge -r 1729:HEAD http://svn.omii.ac.uk/svn/trunk/ Test-Stable-Branch_merge
$ svn ci -m "BugID: 9876 -- Merge from trunk (revs 1729:HEAD) to /branches/Test-Stable-Branch" Test-Stable-Branch_merge

Best practice

While not mandated by the operation of svn, there are a number of processes and practices which we should attempt to adhere to while using the OMII svn repository.

  • Anything you check in should at minimum compile. Checked-in code that doesn't compile just causes pain for other people.
  • Tags, once made, should not be modified.
  • When branching, put the text "Keywords: Branch" in the changelog
  • When merging, put the text "Keywords: Merge" in the changelog, and indicate clearly what was merged (repository URL and revision numbers)

Branching

  • Branching is currently being done with the branch being the stable form, and trunk being the development form of the code. This is because the majority of development work is done on trunk.

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-17) was last changed on 22-Jul-2008 10:00 by Hugo Mills [RSS]

© The University of Southampton on behalf of OMII-UK. All Rights Reserved. | Terms of Use | Privacy Policy | PageRank Checker