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 hgversion=3.0.1 hgmajor=3 hgminor=0 -1 hgrev= ./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: hgminor='0 -1' 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