read configuration files in universal newline mode

Matt Mackall mpm at selenic.com
Tue Jan 27 20:14:15 CST 2009


On Tue, 2009-01-27 at 20:45 -0500, Douglas Philips wrote:
> On or about 2009 Jan 27, at 7:46 PM, Benjamin Pollack indited:
> > For the record, as a Mac user for about twenty years now, I do *not*
> > want \r honored.  Its existence in any files on my system at this  
> > point
> > is a bug.  Because no OS X editor defaults to \r, we are only
> > inconveniencing those who have deliberately set their editors to use
> > Classic-style line endings, in which case, pardon me, but they kind of
> > deserve what they get.
> 
> Well, that is sure vindictive. Either they don't know they have that  
> setting, in which case, "meh",
> or perhaps they have that set in order to work with some older tools,  
> in which case why should Mercurial deliberately get in their way?
> 
> Frankly I don't see why Mercurial has to be a piss-ass about this,  
> Python itself deliberately permits handling \r endings with aplomb.

The existence of the 'U' file mode is actually very little help. Sure,
we can make config files work this way, but that's just the tip of the
iceberg.

If we wanted to support such line endings consistently, quite a lot else
in Mercurial would have to be audited and changed. Patch generation and
application as well as delta generation come to mind. And Python
wouldn't be of much help here as it generally doesn't know about '\r' as
a line ending.

Given that such line endings are going away (in fact, mostly gone
already), I don't see that there's much value to even starting down this
fairly long road.

-- 
http://selenic.com : development and support for Mercurial and Linux




More information about the Mercurial-devel mailing list