Core MaterialIntroductionGradingClass Repository

Contents

Index

Class Repository

The class repository is managed by the distributed version control system called Mercurial. It is distributed because your local machine has a copy of the repository. You check out files from the local repository and check in changes into it, all on the local machine without connecting to a network. To communicate between repositories on different machines, you use hg push and hg pull (hg is the chemical symbol of mercurial).

If you have not used Mercurial before, it is easy to follow one of the many on-line tutorials. The basic commands you need are as follows.

Before you start, make sure that you have an account on cycle1.csug.rochester.edu. Create your local repository in a directory, which we use cs253hg as an example. It is easiest to use a command-line interface through either the terminal program on Linux, Mac OS, or Cygwin on Windows. The sequence of commands are

mkdir cs253hg 
cd cs253hg
hg init

Next link the new repository with the shared class repository on cycle1.csug. Create the file cs253hg/.hg/hgrc and add the following (if your repository is not on the same network as cycle1, e.g. on your laptop). Otherwise use file://u/cding/cs253hg instead of the ssh address below. If ssh is used, you will need to type in your password each time you synchronize with server repository (your local commits never require a password).

[paths]
default = ssh://[uid]@cycle1.csug.rochester.edu//u/cding/cs253hg

Set up your user name by creating the file in your home directory  /.hgrc and add the following. Note this is not the same file as .hg/hgrc inside cs253hg.

[ui]
username = First, Last <email>

Now you are ready to connect to cycle1.csug and download the content. Inside cs253hg, use the following two commands first to download the content into the local repository and then check out the current version of files.

hg pull
hg update

After the two steps, you will see a copy of this draft book in cs253hg/dynbook/.


August 29, 2012

Core MaterialIntroductionGradingClass Repository

Contents

Index