#3610, How make 'svn patch' able to use the targets lines for intermediate context?

2010-04-14 Thread Daniel Näslund
Hi! #3610 [1] is about ignoring white space changes to be able to apply patches that have been mangled, i.e. a mailing software converting tabs to spaces, removing trailing white spaces or leading white spaces. It means that if a certain option is given, we will match and apply hunks if the only

Re: #3610, How make 'svn patch' able to use the targets lines for intermediate context?

2010-04-14 Thread Stefan Sperling
On Wed, Apr 14, 2010 at 04:21:56PM +0200, Daniel Näslund wrote: > Hi! > > #3610 [1] is about ignoring white space changes to be able to apply > patches that have been mangled, i.e. a mailing software converting tabs > to spaces, removing trailing white spaces or leading white spaces. > > It means

Re: #3610, How make 'svn patch' able to use the targets lines for intermediate context?

2010-04-14 Thread Daniel Näslund
On Wed, Apr 14, 2010 at 05:35:36PM +0200, Stefan Sperling wrote: > On Wed, Apr 14, 2010 at 04:21:56PM +0200, Daniel Näslund wrote: > > Hi! > > > > #3610 [1] is about ignoring white space changes to be able to apply > > patches that have been mangled, i.e. a mailing software converting tabs > > to

Re: #3610, How make 'svn patch' able to use the targets lines for intermediate context?

2010-04-14 Thread Alan Barrett
On Wed, 14 Apr 2010, Stefan Sperling wrote: > Yes. Just use whatever comes from the patch, including context lines. > This is consistent with the current behaviour. I think we should avoid > special cases where this rule is currently not true anymore. > (I'm not sure how UNIX patch behaves wrt con

Re: #3610, How make 'svn patch' able to use the targets lines for intermediate context?

2010-04-14 Thread Daniel Näslund
On Wed, Apr 14, 2010 at 08:18:06PM +0200, Alan Barrett wrote: > On Wed, 14 Apr 2010, Stefan Sperling wrote: > > Yes. Just use whatever comes from the patch, including context lines. > > This is consistent with the current behaviour. I think we should avoid > > special cases where this rule is curr

Re: #3610, How make 'svn patch' able to use the targets lines for intermediate context?

2010-04-14 Thread Stefan Sperling
On Wed, Apr 14, 2010 at 05:49:51PM +0200, Daniel Näslund wrote: > On Wed, Apr 14, 2010 at 05:35:36PM +0200, Stefan Sperling wrote: > > I.e. we'll add some optional magic in match_hunk(), making it skip over > > whitespace on either side (as determined by isspace()), but comparing > > any other char

Re: #3610, How make 'svn patch' able to use the targets lines for intermediate context?

2010-04-14 Thread Stefan Sperling
On Wed, Apr 14, 2010 at 09:27:25PM +0200, Daniel Näslund wrote: > On Wed, Apr 14, 2010 at 08:18:06PM +0200, Alan Barrett wrote: > > I don't buy the argument that it's necessary, for consistency with > > current svn behaviour, to copy context lines from the patch to > > the output file. It is consi

Re: #3610, How make 'svn patch' able to use the targets lines for intermediate context?

2010-04-14 Thread Alan Barrett
On Wed, 14 Apr 2010, Daniel Nslund wrote: > If we would implement --ignore-whitespaces to have the behaviour you > suggested we would have to rewrite the parts dealing with > modified_stream to make us able to distinguish between context lines and > added lines. At the moment, we filter out the lea