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

2010-02-24 Thread Stefan Sperling
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 t

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

2010-02-24 Thread Daniel Näslund
On Tue, Feb 23, 2010 at 11:48:07PM +0100, Stefan Sperling wrote: > Can you post the test? I've attached the test. Error cases -- If there are lines in the target before the hunk we will get the error of inconsistent line endings when applying the hunk lines. (Remove the # from the fir

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

2010-02-23 Thread Stefan Sperling
On Tue, Feb 23, 2010 at 10:06:04PM +0100, Daniel Näslund wrote: > On Tue, Feb 23, 2010 at 09:27:34PM +0100, Stefan Sperling wrote: > > On Tue, Feb 23, 2010 at 08:57:26PM +0100, Daniel Näslund wrote: > > > I have a test where the target uses '\r\n' and the patch uses '\r' . The > > > eols are consis

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

2010-02-23 Thread Daniel Näslund
On Tue, Feb 23, 2010 at 09:27:34PM +0100, Stefan Sperling wrote: > On Tue, Feb 23, 2010 at 08:57:26PM +0100, Daniel Näslund wrote: > > On Tue, Feb 02, 2010 at 09:11:52PM +0100, Stefan Sperling wrote: > > > On Tue, Feb 02, 2010 at 08:48:43PM +0100, Daniel Näslund wrote: > > > > Hi Stefan! > > > > >

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

2010-02-23 Thread Daniel Näslund
On Tue, Feb 23, 2010 at 08:57:26PM +0100, Daniel Näslund wrote: > On Tue, Feb 02, 2010 at 09:11:52PM +0100, Stefan Sperling wrote: > > On Tue, Feb 02, 2010 at 08:48:43PM +0100, Daniel Näslund wrote: [..] > What to do? > [ ] Write documentation saying we can only repair eols on targets with a >

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

2010-02-23 Thread Stefan Sperling
On Tue, Feb 23, 2010 at 08:57:26PM +0100, Daniel Näslund wrote: > On Tue, Feb 02, 2010 at 09:11:52PM +0100, Stefan Sperling wrote: > > On Tue, Feb 02, 2010 at 08:48:43PM +0100, Daniel Näslund wrote: > > > Hi Stefan! > > > > > > In match_hunk() we try to match lines from the context of the patch wi

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

2010-02-23 Thread Daniel Näslund
On Tue, Feb 02, 2010 at 09:11:52PM +0100, Stefan Sperling wrote: > On Tue, Feb 02, 2010 at 08:48:43PM +0100, Daniel Näslund wrote: > > Hi Stefan! > > > > In match_hunk() we try to match lines from the context of the patch with > > lines in the target. Earlier, in init_patch_target() we detect the

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

2010-02-02 Thread Stefan Sperling
On Tue, Feb 02, 2010 at 08:48:43PM +0100, Daniel Näslund wrote: > Hi Stefan! > > In match_hunk() we try to match lines from the context of the patch with > lines in the target. Earlier, in init_patch_target() we detect the eol > of the target and open streams to read from the target and to write t