Code Repository

Using Mercurial With the the Phone Class Source Code

Source code developed in class and other files are maintained in Mercurial.

This page briefly describes how to access the source trees. For more information on how to use Mercurial, there are several external sources with documentation: UnderstandingMercurial Tutorial hgbook

Unlike CVS, Mercurial is a distributed version control system, which means that source code revisions can be shared between developers without necessarily accessing a central repository. The “official” repository is maintained at http://phone.cs.berkeley.edu/hg.

Accessing the repository

HTTP access

You can both browse the repository and clone it (i.e. get a local repository and working directory) from http://phone.cs.berkeley.edu/hg.

For example, to clone the sandbox:

hg clone http://phone.cs.berkeley.edu/hg/sandbox

For pushes:

Username: see mike or rj
Password: see mike or rj

You can clone without authenticating

Cloning using SSH

Contributing directly to the repository requires users to have ssh access on phone.cs.berkeley.edu (currently www-research.cs.berkeley.edu).

To clone the sandbox, use:

 hg clone ssh://[username@]phone.cs.berkeley.edu//project/cs/brewer/tier/phone/hg

Note the double slash before the data path, and make sure to replace [username@] with your appropriate username.

Updating to the current version

To update to the current set of changes requires two steps, first to pull changes into your local repository, then update your local snapshot to those changes:

hg pull
hg update

You can do both these steps in one by using:

 hg pull -u

For more information, see the mercurial documentation.

Committing a change

In mercurial, commits are all first made to a local repository, and can then be shared with another repository (e.g. the master repository) using a variety of methods.

Thus anyone can commit local changes to their locally cloned repository using:

 hg commit

It's useful to first set up a ~/.hgrc file in your home directory containing your name and email address, for example:

  [ui]
  username = Oski Bear <oski@cs.berkeley.edu>

Once you've made local commits, you can still update to incorporate changes from the main tree, but you'll need to manage multiple local branches. See the mercurial documentation for more explanation.

Differences from CVS

Fundamentally, mercurial is a distributed VC system instead of a centralized one, so there are a large number of differences that are better described elsewhere.

Some more specific minor differences include:

  • Instead of individual .cvsignore files in each directory, there is a single .hgignore file at the top of the repository. Currently we use the same glob syntax that .cvsignore files had.
  • Mercurial does not ignore any file patterns (such as .o files) by default, they must be in the .hgignore file.

Compiled Packages

There is an APT repository available for the phone at http://phone.cs.berkeley.edu/apt. This will contain compiled packages which can be downloaded on the fly from the phone itself. We will announce how to post packages to this repository soon!

 
coderepository.txt · Last modified: 2008/02/12 23:40 by kheimerl
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki