RFR: JDK-8029512 : webrev.ksh: fix parsing of parent repo paths from hgrc file

Dave Pointon dpointo8 at linux.vnet.ibm.com
Tue Jan 7 11:46:58 UTC 2014


Hi Mike ,

On Mon, 2014-01-06 at 19:45 -0800, Mike Duigou wrote:
> I have updated my previous webrev to make the regular expressions simpler and more portable based on feedback. I have tested on Mac, Solaris, Linux and Cygwin.
> 
> http://cr.openjdk.java.net/~mduigou/JDK-8029512/1/webrev/
> 
> I did also note that the hgrc format allows for definitions of the form:
> 
> foo =
>   bar
> 
> where any line beginning with white space is considered a continuation line. This is not easy to support with sed and I have not attempted to solve it in this patch. (I did document the limitation).
> 
> To be honest the best approach may have been to write the script in Python and use the ConfigParser package but I suspect that's what Mercurial does so this would re-expose us to the original bug which apparently necessitated manual parsing.
> 
> Cheers,
> 
> Mike
> 
<snip>

It looks a little over-complicated than is needed, but that aside, there
appear to be 2 identical typos - on lines 1949 and 1953 - whereby the
'OR' operator ('||') appears instead of the pipe operator ('|').

I would suggest the use of perl for JDK 9 since all whitespace
characters are matched &/or captured by the '\s' regex operator.

Best rgds ,

-- 
Dave Pointon FIAP MBCS

Now I saw, tho' too late, the folly of beginning a work before we count
the cost and before we we judge rightly of our strength to go thro'
with it - Robinson Crusoe




More information about the build-dev mailing list