Line ending translation extension

Mark Hammond mhammond at skippinet.com.au
Sun Sep 6 19:57:13 CDT 2009


On 7/09/2009 7:30 AM, Eric M. Hopper wrote:
> Almost all of my tools under Unix notice Windows style line endings and
> just work.  My editor notices and saves the file to have Windows style
> line endings.  My compiler treats them the same.  Python treats them the
> same.  etc...

Yes, me too.  I'd even go so far as to suggest current Windows dev tools 
are *more* likely to have good EOL support than non-windows tools - but 
you can't escape that \r\n is the 'native' line ending on Windows.

> The only pain I would likely feel if all the files in my repository
> mysteriously switched to Windows-style line endings would be the icky
> feeling of knowing I was saving files with tons of extra redundant
> garbage in them.

Consider the creation of a new file, or applying a patch received via 
email - both of them would seem likely to introduce inappropriate line 
endings.  My experience is that regardless of the smarts of your 
'primary editor', there is much scope for mixed line endings to creep 
in, both via your own tool-chain and the tools used by others, when 
anything other than 'native' line endings are used.

But regardless, I'm afraid I'm missing your point.  You are asserting it 
isn't a real problem, or wouldn't be a real problem if everyone just 
used the right tools, or something else?

Cheers,

Mark


More information about the Mercurial-devel mailing list