rivet is hosted by Hepforge, IPPP Durham
close Warning: Can't synchronize with repository "(default)" (Repository path '/hepforge/hg/rivet/public/rivet' does not exist.). Look in the Trac log for more information.

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.

  1. Clone the repo -- just once at the beginning
      # anonymous user:
    $ hg clone https://phab.hepforge.org/source/rivethg/
      # or Rivet developer:
    $ hg clone ssh://vcs@phab.hepforge.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 -b flag.

  1. 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"
  1. Get updates from central repo
    $ hg pull
    $ hg merge
    $ hg commit -m "merge"
  1. Push to central repo
    $ hg push
    Note: 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. hgrc would then have
    default = ..../branchrepo
    trunk = ..../trunkrepo
    Then you can regularly do:
  1. 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.
  1. Create new development repo in hepforge
    $ ssh login.hepforge.org
    $ umask 002
    $ cd /hepforge/hg/rivet/
    $ hg clone public/rivet private/foobar
    In principle, one can also clone via ssh to a new location in private, but then without the space savings.
  1. 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.

Last modified 2 years ago Last modified on Nov 7, 2018, 4:49:30 PM