EOL extension and patch.eol

Sune Foldager cryo at cyanite.org
Wed Dec 9 01:30:03 CST 2009


Mark Hammond wrote:
> On 9/12/2009 3:50 PM, Steve Borho wrote:
>> By default Mercurial treats file contents as binary, and it expects
>> stdout to follow suit.  Otherwise commands like hg cat would be
>> utterly useless on Windows.
> 
> Only useless for binary files.  For the vast majority of files in a
> repo, using text mode for 'hg cat' seems entirely appropriate - you get
> native line endings.  Binary files are a special case so could be
> treated as such (eg, an option to 'hg cat' which indicates you want a
> 'raw' dump instead of treating it as text...)

Yes, but hg cat works fine for text files as it is, with or without
proper line ending translation. Also, _every_ *) other text editor on
Windows apart from notepad handles these things without problems, and I
don't think it's entirely unreasonable to demand that users get
something more capable if they intend to edit text files handled with
Mercurial.

*) I have yet to encounter one that doesn't.

/Sune



More information about the Mercurial-devel mailing list