[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Why non matching eols in patch and target. (svn patch related)

From: Stefan Sperling <stsp_at_elego.de>
Date: Wed, 24 Feb 2010 13:27:28 +0100

On Wed, Feb 24, 2010 at 12:32:59PM +0100, Daniel Näslund wrote:
> Trying to understand the problem
> ----------------------------------
> A translated stream expects that the stuff to be written will have
> consistent line endings. It checks for consistent line endings by
> comparing the eol with the first eol written to the stream. If the first
> thing written is from the target, we will compare all subsequent eols
> with the targets eol.

Hmmm... is your understanding of the translation APIs correct?

The way I think it works is that you wrap a stream inside a translation
stream. At the point where you do the wrapping, you tell the translation
stream whether it should repair EOLs, and also what kind of EOL you'd
like the translated result to have.

Then, *if* you told the stream to repair newlines, the EOL-style you
specified at wrapping time is written to the output stream no matter
what EOL-style appears on the input stream.
Else, the stream is written unchanged.

Stefan
Received on 2010-02-24 13:28:07 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.