This page contains some tips and tricks for working with Mercurial in the JMC Project for Committers.
Getting Started
- First install Mercurial (different on different platforms)
- Next ensure that you have an OpenJDK user (http://openjdk.java.net/census)
If you need an OpenJDK user name and/or generate a key, follow instructions here: http://openjdk.java.net/guide/producingChangeset.html#jdkUserName - Next install the defpath plug-in (http://openjdk.java.net/projects/code-tools/defpath/)
- Next create a ~/.hgrc file and fill it out according to the example below.
Next clone the JMC source:
hg clone http://hg.openjdk.java.net/jmc/jmc
You may also want to set up so that you can use p4merge for merging and diffing, and also use a template for commits.
If the change comes from a non-Author, don't forget to set "Contributed-by:".
To diff using p4merge, simply use the command:
hg p4diff
To initialise defpath, after installed and configured, run:
hg defpath -d
Review
Send either a unified diff or a webrev to the jmc-dev@openjdk.java.net mailing list
Webrev short hand:
ksh /usr/local/bin/webrev.ksh → generates the webrev
rsync -avz <folder (named as the bugid) containing the rev> <openjdkid>@cr.openjdk.java.net:~/
Getting and applying a patch from a webrev:
# Update your local clone
cd JMC_ROOT
hg pull
hg update
# Download the patch
cd <some folder>
wget http://cr.openjdk.java.net/~hirt/JMC-5922/webrev.1/jmc.patch
# Apply the patch
cd JMC_ROOT
hg import --no-commit <some folder>/jmc.patch