Friday December 14, 2007 ![]() |
JMX, SNMP, Java, etc...Daniel Fuchs blogs on JMX, SNMP, Java, etc... |
The source code for OpenJDK is now available in Mercurial repositories. These repositories are organized into mercurial forests. If you are eager to work on the OpenJDK code, you will want to install the forest extension for Mercurial. Here is how I did it on my windows test machine. Disclaimer: this is a description of the steps I followed on my test machine: I can't guarantee that it will work for yours... Installing Mercurial on Windows
Installing Mercurial on my Windows machine was quite easy. I got the Binary Packages from the selenic.com website and followed the instructions. I had already Installing the forest extension
I simply cloned the forest repository in cd c:/Mercurial hg clone http://hg.akoha.org/hgforest hgforest Then I edited [extensions] forest=c:/Mercurial/hgforest/forest.py as documented in the Mercurial Wiki. Choosing a merge toolThere are many merge tools that you can use with mercurial.
Not knowing any of them I simply picked one, kdiff3 on windows
At the time I did this investigation, I got kdiff3 from sourceforge.net - where I chose to download @echo off
setlocal
:: Look in the registry for KDiff3 location
for /f "skip=2 tokens=3*" %%A in (
'"reg query "HKEY_CURRENT_USER\SOFTWARE\KDiff3" /ve 2> nul"' ) do set KDiff3Path=%%B
if "%KDiff3Path%"=="" (goto :notfound) else (goto :kdiff3)
:kdiff3
"%KDiff3Path%\kdiff3.exe" --auto --L1 Base --L2 Local --L3 Other %2 %1 %3 -o %1
if not errorlevel 0 (exit /b 1) else (exit /b 0)
:notfound
echo hgmerge: cannot find KDiff3 location in the registry.
exit /b 1
as shown in the Mercurial Wiki. Note: The code above is borrowed from the excellent Mercurial Wiki - I am not its author. Thanks to whoever provided this!
Then I edited [ui] merge = kmerge I was then ready to test kdiff3 using my merge test case. It worked beautifully, except that if you interrupted the tool (e.g. exit without saving) - it left some temporary files in your repository working dir. So if you're eager to work with OpenJDK sources, I hope this story will help you! cheers
PS: whatever you do with openJDK, make sure to visit Kelly's excellent posts:
Update: Ted Neward has also written an excellent post on getting OpenJDK build environment for windows: Let the JDK Hacking Begin... Update 2: Volker Simonis has also an excellent two parts post (part I) and (part II) on building and running the OpenJDK on Linux/x86. Update 3: Lars Werstergren has also a very nice Beginner's Guide to OpenJDK. Thanks to Brad Wetmore for pointing this out. Tags: forests hg mercurial openjdk opensourcePosted by dfuchs ( Dec 14 2007, 04:38:37 PM CET ) Permalink Comments [2] |
Hi Daniel --
I am trying to install the forest extension for Mercurial on Windows following your posted instructions -- they are GREAT - thanks!
But.... it seems that this link is dead
http://www.terminus.org/hg/hgforest
and I can't seem to find a replacement. Any ideas?
Posted by Celina on March 06, 2008 at 10:13 PM CET #
Hi Celina,
Thanks for the notice. Apparently the forest repository has moved here:
http://hg.akoha.org/hgforest/
-- daniel
Posted by daniel on March 07, 2008 at 12:12 AM CET #