From Fedora Project Wiki

OLPC source code repository

All the applications, tools, libraries & tests written for the OLPC project are maintained in a Mercurial source control repository. Mercurial is a distributed SCM system (very similar to GIT ) written in Python, which is fairly easy to learn. For those coming from a CVS background, there is a short quickstart guide which will get you upto speed. There are also some useful notes written by the Xen folks.

Installing Mercurial software

Mercurial requires a minimal of Python version 2.3, and there are RPMs readily available for Fedora Core 4 or later, in the Extras repository. So, assuming the Fedora Extras repository is enabled, installation is simply a matter of running the command

$ su - root

== Repository layout ==

The repository laid out under a couple of functional groups, tools, applications, libraries & tests, within each group is a directory for each project+branch pair. For example, the main development branch of the SDK project is under the path 'tools/sdk--devel'. The currently defined project paths are:


{| border="1"
|-
|Module||Branch||Path
|-
|Software development kit||Development||[http://hg.fedorahosted.org/hg/olpc/tools/sdk--devel tools/sdk--devel]
|-
|Image builder tools||Development||[http://hg.fedorahosted.org/hg/olpc/tools/image--devel tools/image--devel]
|-
|QEMU network tools||Development||[http://hg.fedorahosted.org/hg/olpc/tools/qemu-network--devel tools/qemu-network--devel]
|-
|QEMU manager service||Development||[http://hg.fedorahosted.org/hg/olpc/libraries/qemu-manager--devel libraries/qemu-manager--devel]
|-
|QEMU admin UI||Development||[http://hg.fedorahosted.org/hg/olpc/applications/qemu-admin--devel applications/qemu-admin--devel]
|-
|QEMU system config UI||Development||[http://hg.fedorahosted.org/hg/olpc/applications/system-config-qemu--devel applications/system-config-qemu--devel]
|}


== Anonymous read-only access ==

The beauty of a distributed SCM system such as Mercurial, is that developers do not need write access to the main repository in order to make use of SCM features. Once a local copy of the repository has been created one can work away  on some new feature for a while, then export a complete patch bundle consisting of all local changelists, and submit  them back to the master repository. Once merged the master repository will contain the complete local changelist history too.

=== Initial checkout ===

Anonymous access to the repository is done via the HTTP protocol. So, for example, to get a checkout of the SDK tools, one would just run the following command on your local machine

<pre>$ cd $HOME
$ mkdir olpc
$ cd olpc
$ hg clone http://hg.fedorahosted.org/hg/olpc/tools/sdk--devel

Shortly thereafter you'll have a local directory called 'sdk--devel' containing a complete copy of the master repository.

Submitting changelists / patches

So, after working away on a local checkout for a while, the time will come to submit a patch. The simplest way to do this is just to create a bundle containing the difference between the upstream repository and your local repository.

$ cd $HOME/olpc/sdk--devel
$ hg bundle myfeature.hg http://hg.fedorahosted.org/hg/olpc/tools/sdk--devel

This creates a file 'myfeature.hg' containing the changes. Just mail this patch to the developers mailing list or attach it to a bug report / feature request ticket.

Authenticated read-write access

XXX todo

Monitoring changes

The Mercurial repository server doesn't send out any email spam when commits occurr, instead every project has a dedicated RSS feed which contains commit info. Visit the repository browser to see the URLs for the feeds, and just add each project you wish to monitor to your RSS feed reader. If you don't currently use an RSS feed reader, then checkout 'LiFeRea' which is available in the Fedora Extras YUM repository.