You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

This page contains some tips and tricks for working with Mercurial in the JMC Project for Committers.

Getting Started

  1. First install Mercurial (different on different platforms)
  2. 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 
  3. Next install the defpath plug-in (http://openjdk.java.net/projects/code-tools/defpath/)
  4. Next create a ~/.hgrc file and fill it out according to the example below.
  5. 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

  • No labels