logo       

Re: Re: Line endings opinion poll (with bonus opinion): msg#00666

Subject: Re: Re: Line endings opinion poll (with bonus opinion)
On Sunday, October 31, 2004 7:06 AM, Igor Bukanov wrote:

> > What would the correct line ending be for a repo that's on a
> > drive that you mount from Unix as well as from Windows?
>
> As it was already pointed out, there are 2 cases to consider:
>
> 1) New text goes to the _darcs repository. Ideally I would like darcs to
> accept all 3 line endings, \r\n, \n and \r even if they are mixed in the
> single text file. That is darcs should split the text file into lines
> and work with logical lines and not their physical presentation.
> Internally the lines can be separated by \n but that is OK since if
> somebody wishes to edit stored patch files, then the person can deal
> with line ending there as well.

I'll second that.  The only catch would be if someone needed to have a \r in
the middle of a line, although I can't conceive of a situation where that
would be desirable.  (additionally, it would only be possible on UNIX, and
darcs seems to default to settings that are platform-independant).

> 2) Darcs generates text output from the context of _darcs repository. In
> this case it would nice IMO if there is a flag to specify a particular
> line ending for the working files and patches which defaults to platform
> specific line ending or existing file context. That is, for new files or
> output to stdout darcs should use this flag while for the existing files
> the present line endings should be preserved.

I'm imagining that darcs would read the file into logical lines, apply the
patches, then write them back out using encoding X.

If you wanted to preserve the encoding, you'd have to analyze the lines as
you read them to figure out what encoding they use.  Then remember that flag
for when you write it again.

I'd almost rather it just always write using the repo-specified encoding,
since its less code to write.  But, I guess I wouldn't mind either way.

-Mike


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
boot-loaders.gr...    php.pear.genera...    debugging.valgr...    kde.redhat.user...    text.xml.xsl.ge...    culture.languag...    hardware.microc...    java.servicemix...    redhat.release....    web.zope.plone....    user-groups.lin...    opendarwin.webk...    video.mjpeg.use...    sysutils.bcfg2....    encryption.gpg....    lx-office.devel...    xfree86.forum/2...    mail.mutt.devel...    acpi.devel/2003...    qnx.openqnx.dev...    network.irc.irs...    freebsd.devel.m...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe