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

2014-07-08 Thread Daniel Fuchs
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

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

2014-07-08 Thread Daniel Fuchs
Hi Mike, The issue seems to be that 'expr 0 + 0' writes 0 on stdout but has an exit status of 1 $ expr 0 + 0 0 $ echo $? 1 $ man expr EXPR(1) BSD General Commands Manual EXPR(1) [ ... ] DIAGNOSTICS The expr utility exits with one of the following values: 0 the expression

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

2014-07-08 Thread pointo1d
Hi Daniel , On 08/07/14 11:30, Daniel Fuchs wrote: 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

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

2014-07-08 Thread Daniel Fuchs
On 7/8/14 1:40 PM, pointo1d wrote: What do you see if you run the script using bash ? Just the same. best regards, -- daniel

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

2014-07-08 Thread pointo1d
Hiya Daniel , On 08/07/14 13:15, Daniel Fuchs wrote: On 7/8/14 1:40 PM, pointo1d wrote: What do you see if you run the script using bash ? Just the same. best regards, -- daniel Try this ... #!/bin/sh -e # # Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.

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

2014-07-08 Thread Daniel Fuchs
Hi, Thanks Dave, yes - your patch works like a charm :-) best regards, -- daniel Note: the following also works on my machine: -- check() { read var if expr 1 + $var >/dev/null ; then echo $var else return 2 fi } hgmajor="

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

2014-07-08 Thread pointo1d
Hiya Daniel , On 08/07/14 14:44, Daniel Fuchs wrote: Hi, Thanks Dave, yes - your patch works like a charm :-) best regards, -- daniel Note: the following also works on my machine: -- check() { read var if expr 1 + $var >/dev/null ; then

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

2014-07-08 Thread Mike Duigou
I've updated the webrev with yet a different variant of the extract version field function. http://cr.openjdk.java.net/~mduigou/JDK-8048184/1/webrev/ Sorry Dave, I resist all attempts to introduce awk. :-) Mike On Jul 8 2014, at 06:44 , Daniel Fuchs wrote: > Hi, > > Thanks Dave, > > yes -

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

2014-07-08 Thread Daniel Fuchs
Hi Mike, This one works perfectly on my machine :-) Thumbs up! -- daniel On 7/8/14 7:40 PM, Mike Duigou wrote: I've updated the webrev with yet a different variant of the extract version field function. http://cr.openjdk.java.net/~mduigou/JDK-8048184/1/webrev/ Sorry Dave, I resist all atte

RFR: 8042841 : hgforest.sh better exit code handling, clone options, verbose mode, options documentation

2014-07-08 Thread Mike Duigou
hello all; This is a diverse set of changes that I have been working on for a while to improve various aspects of the hgforest command. It includes: - Various minor cleanups - Better documentation of options and important shell variables. - Verbose output mode - Further refinement of output re