EOL extension and patch.eol

Mark Hammond mhammond at skippinet.com.au
Tue Dec 8 22:13:37 CST 2009


On 8/12/2009 8:44 PM, Martin Geisler wrote:
> Dirkjan Ochtman<dirkjan at ochtman.nl>  writes:
>
>> On Tue, Dec 8, 2009 at 02:19, Mark Hammond<skippy.hammond at gmail.com>  wrote:
>>> That said though, I wouldn't consider that to be a "blocker".  For my
>>> interest though, does hg reopen stdout as binary?  Note that the script:
>>
>> I'm pretty sure we do.
>
> We do, the 'hg' script has these lines:
>
>    for fp in (sys.stdin, sys.stdout, sys.stderr):
>        mercurial.util.set_binary(fp)

So the next obvious question is: why?

IIUC, this will only have any impact on Windows, and what it does there 
is to ensure output written by hg doesn't have native line endings.  eg:

% hg log > log.out

Should ideally generate a file that could be opened in any Windows 
editor (including notepad).

Cheers,

Mark



More information about the Mercurial-devel mailing list