RFR: 8048184 : (s) handle mercurial dev build version string

Daniel Fuchs daniel.fuchs at oracle.com
Tue Jul 8 10:30:11 UTC 2014

Hi Mike,

sorry for not reacting sooner.
I applied your patch on my machine, and now get the following:

sh ./get_source.sh
./get_source.sh: line 70: [: too many arguments
./get_source.sh: line 76: [: `)' expected, found -1
./get_source.sh: line 82: [: `)' expected, found -1

I have added:

echo hgversion="$hgversion"
echo hgmajor="$hgmajor"
echo hgminor="$hgminor"
echo hgrev="$hgrev"

just before line 70 and I see this:

$ sh ./get_source.sh
./get_source.sh: line 76: [: too many arguments
./get_source.sh: line 82: [: `)' expected, found -1
./get_source.sh: line 88: [: `)' expected, found -1

There is a strange '-1' which gets printed - and it
seems it comes from $hgminor, whose value is:


best regards,

-- daniel

On 6/26/14 9:01 PM, Mike Duigou wrote:
> Hello all;
> After pushing JDK-8047925 it was discovered that unofficial development builds of Mercurial use a different version string format and get_source.sh needs an enhancement to correctly parse this version string.
> I have also incorporated some cleanup suggested by Dave Pointon, made the script more defensive in it's handling of numeric values and replaced the use of 'which' with the more reliable 'command -v'
> jbsbug: https://bugs.openjdk.java.net/browse/JDK-8048184
> webrev: http://cr.openjdk.java.net/~mduigou/JDK-8048184/0/webrev/
> Mike

More information about the build-dev mailing list