Getting Started as a Rivet Developer
We welcome contributors who want to be able to make changes, compile and test them, and submit them for inclusion. If you want to do this you should install Rivet from the Mercurial (hg) repository as described below.
In addition to the user build requirements, you will need autotools and libtool installed (probably as part of your platform's package manager system), and a recent version of Cython (to build the interface between C++ and Python).
Repository access for developers/contributors
Some typical steps in the hg workflow are provided as a reference here. Please refer to http://hginit.com for a complete beginner's tutorial.
- Clone the repo -- just once at the beginning
# anonymous user: $ hg clone https://phab.hepforge.org/source/rivethg/ # or Rivet developer: $ hg clone ssh://firstname.lastname@example.org/source/rivethg/ $ cd rivet $ autoreconf -i ($ ./configure [...]; make install; # cf. regular documentation)Note: The path is automatically encoded in
rivet/.hg/hgrc, so that future pull/push operations do not need an explicit destination.
The default branch is for big developments heading into the next major release. Small fixes and improvements to the current release series will be on a release branch, e.g.
release-2-6-x. You can list all current branches with
hg branches and update to the one of your choice with
hg update <branchname>. You can also check out a specific branch in the original clone operation, using the
- Implement a new feature locally
$ hg pull $ hg update $ # develop first part of change $ hg commit -m "first part of my change" $ # develop second part of change $ hg commit -m "second part of my change"
- Get updates from central repo
$ hg pull $ hg merge $ hg commit -m "merge"
- Push to central repo
$ hg pushNote: Push/pull can come from any repo path. You can either explicitly specify the target, or use shortcuts that you can add by hand to
.hg/hgrc. This is useful when you're on a branch and want to track trunk as the branch develops.
hgrcwould then have
[paths] default = ..../branchrepo trunk = ..../trunkrepoThen you can regularly do:
- Track trunk in branch repo
$ hg pull trunk $ hg merge $ hg ci -m'merge' $ hg push # implies "default"This keeps 'branch' up-to-date with developments on trunk.
- Create new development repo in hepforge
$ ssh login.hepforge.org $ umask 002 $ cd /hepforge/hg/rivet/ $ hg clone public/rivet private/foobarIn principle, one can also clone via ssh to a new location in private, but then without the space savings.
- Merge branch repo back to trunk
$ cd privaterepo-workdir $ hg pull trunk $ hg merge $ hg ci -m'merged' $ hg out trunk # check what will be pushed, maybe use -r to select $ hg push trunk # be SURE of this, it's hard to undo, -r applies here, too ^^^^^
Once you understand the difference between (3.), (5.) and (7.), you've got it! You can create a couple of local clones on your own machine and experiment with all the different features.