[PATCH 0 of 1] tests: fix sed expression for BSD sed

Giorgos Keramidas keramida at ceid.upatras.gr
Sun May 9 19:34:11 CDT 2010


On Sat, 1 May 2010 23:07:21 +0200, Christian Ebert <blacktrash at gmx.net> wrote:
> * David Champion on Saturday, May 01, 2010 at 13:46:40 -0500
>> * On 01 May 2010, Christian Ebert wrote:
>>>>>> BSD sed expects a newline right after '\' in expressions like
>>>>>>
>>>>>> Wrapping the line right after '\' fixes the test-keyword test on FreeBSD
>>>>>> here:
>>>>
>>>> FWIW none of them works on Solaris:
>>>
>>> Thanks. I'm gonna propose a fix, probably in python.
>>
>> Sed is a bundle of nonportability, but basic awk/nawk is generally quite
>> portable.
>>
>> awk '{print} NR==1 {print "foo"}' a >a.tmp
>>
>> Tested on OSX (BSD awk), Linux (GNU awk), and OpenSolaris (System V
>> awk).
>
> This crossed with my python proposal which seems to be queued by
> Matt. I wasn't sure about how portable awk would be, but you're right
> for the basic commands. Thanks for taking the time looking into it.

I just pulled the crew changeset in my own branch.  Thanks for taking
care of this :-)



More information about the Mercurial-devel mailing list