simple mercurial tricks
Tom Rodriguez
Thomas.Rodriguez at Sun.COM
Mon Feb 2 18:59:04 PST 2009
I just figured out a couple simple mercurial tricks that I thought I'd
share. The first is using the mercurial tags to figure out which
hotspot build went into a particular jdk build. The basic form is this:
hg cat -r tag make/hotspot_version | grep HS_
where tag is one of the jdk7-b* tags that RE puts on the build. For
instance
% hg cat -r jdk7-b39 make/hotspot_version | grep HS_
HS_MAJOR_VER=14
HS_MINOR_VER=0
HS_BUILD_NUMBER=06
So jdk7-b39 has hs14.0-b06 in it.
You can do something similar with the web interface using URLs like
this:
http://hg.openjdk.java.net/jdk7/hotspot/hotspot/file/jdk7-b39/make/hotspot_version
Obviously the hotspot_version file contents are only meaningful at the
pointer the promotion was made so you can't get a direct mapping from
a changeset to the particular build it went into.
The other trick requires a mercurial extension called nearest from http://freehg.org/u/morisgi/nearest
. Basically it finds the immediately dominating tag for a particular
revision. It can also find the post dominating tag, which lets you
directly query which jdk build a particular fix went into.
% hg log -r 8261ee795323
changeset: 333:8261ee795323
user: rasbold
date: Wed Sep 17 08:29:17 2008 -0700
summary: 6711100: 64bit fastdebug server vm crashes with
assert(_base == Int,"Not an Int")
% hg nearest --contains
8261ee795323
jdk7
-b39-21
So 8261ee795323 is 21 changesets before the changeset tagged with jdk7-
b39, so 6711100 was fixed in hs14-b06 which is in jdk7-b39. There are
other ways to find the answer to these questions but I think asking
the repo directly is more reliable and often more convenient. I've
only played with the nearest extensions lightly but I didn't see any
way to ask this question with existing commands and it seems to work ok.
tom
More information about the hotspot-compiler-dev
mailing list