You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Mark Watts <mw...@stny.rr.com> on 2003/05/27 18:48:41 UTC

Windows: Patch can't process SVN Diff output

When running the following against a local change 

C:\test\Svn diff > c:\temp\svndiff.txt

I get the attached diff file as output.  When using patch from
http://unxutils.sourceforge.net/ to process this file and apply the patch
back to a source tree patch fails.  It would appear to fail because the diff
file has mixed CRLF and LF chars.

The chunk header (not sure it is called this) "@@ -1,4 +1,5 @@" is
terminated by only a LF not a CRLF
It also complains because the last line of the patch does not have a CRLF at
the end.

Now, I realize that the problem MAY in fact be in the version of patch that
I am using but it does seem odd to m that the diff should contain mixed CRLF
and LF chars in one file.


Thanks

-Mark

RE: Windows: Patch can't process SVN Diff output

Posted by Mark Watts <mw...@stny.rr.com>.
> -----Original Message-----
> From: Mark Watts [mailto:mwatts3@stny.rr.com] 
> Sent: Tuesday, May 27, 2003 14:49
> To: 'Subversion Dev'
> 
> When running the following against a local change 
> 
> C:\test\Svn diff > c:\temp\svndiff.txt
> 
> I get the attached diff file as output.  When using patch 
> from http://unxutils.sourceforge.net/ to process this file 
> and apply the patch back to a source tree patch fails.  It 
> would appear to fail because the diff file has mixed CRLF and 
> LF chars.
> 
> The chunk header (not sure it is called this) "@@ -1,4 +1,5 
> @@" is terminated by only a LF not a CRLF It also complains 
> because the last line of the patch does not have a CRLF at the end.
> 
> Now, I realize that the problem MAY in fact be in the version 
> of patch that I am using but it does seem odd to m that the 
> diff should contain mixed CRLF and LF chars in one file.
Sorry, I just realized that the filename lines are also terminated by just a
LF also

--- file.txt	(revision 2)
+++ file.txt	(working copy)

-mark



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org


Re: Windows: Patch can't process SVN Diff output

Posted by Brian Denny <br...@briandenny.net>.
This still happens for me with client and server 0.25.

-brian


On Tue, May 27, 2003 at 11:16:16PM +0200, Branko ??ibej wrote:
> >>The chunk header (not sure it is called this) "@@ -1,4 +1,5 @@" is
> >>terminated by only a LF not a CRLF
> >>It also complains because the last line of the patch does not have a CRLF at
> >>the end.
> >>
> >>Now, I realize that the problem MAY in fact be in the version of patch that
> >>I am using but it does seem odd to m that the diff should contain mixed CRLF
> >>and LF chars in one file.
> >>    
> >>
> >
> >Ok, I can see that can be a problem.  I'll fix this soonishly ;).
> >  
> >
> Sander, didn't you (or someone) fix this recently? It may have been
> after 0.23.0, but I do remember a commit to that note.
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Windows: Patch can't process SVN Diff output

Posted by Branko Čibej <br...@xbc.nu>.
Sander Striker wrote:

>>From: Mark Watts [mailto:mwatts3@stny.rr.com]
>>Sent: Tuesday, May 27, 2003 8:49 PM
>>    
>>
>
>  
>
>>When running the following against a local change 
>>
>>C:\test\Svn diff > c:\temp\svndiff.txt
>>
>>I get the attached diff file as output.  When using patch from
>>http://unxutils.sourceforge.net/ to process this file and apply the patch
>>back to a source tree patch fails.  It would appear to fail because the diff
>>file has mixed CRLF and LF chars.
>>
>>The chunk header (not sure it is called this) "@@ -1,4 +1,5 @@" is
>>terminated by only a LF not a CRLF
>>It also complains because the last line of the patch does not have a CRLF at
>>the end.
>>
>>Now, I realize that the problem MAY in fact be in the version of patch that
>>I am using but it does seem odd to m that the diff should contain mixed CRLF
>>and LF chars in one file.
>>    
>>
>
>Ok, I can see that can be a problem.  I'll fix this soonishly ;).
>  
>
Sander, didn't you (or someone) fix this recently? It may have been
after 0.23.0, but I do remember a commit to that note.

-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

RE: Windows: Patch can't process SVN Diff output

Posted by Sander Striker <st...@apache.org>.
> From: Mark Watts [mailto:mwatts3@stny.rr.com]
> Sent: Tuesday, May 27, 2003 8:49 PM

> When running the following against a local change 
> 
> C:\test\Svn diff > c:\temp\svndiff.txt
> 
> I get the attached diff file as output.  When using patch from
> http://unxutils.sourceforge.net/ to process this file and apply the patch
> back to a source tree patch fails.  It would appear to fail because the diff
> file has mixed CRLF and LF chars.
> 
> The chunk header (not sure it is called this) "@@ -1,4 +1,5 @@" is
> terminated by only a LF not a CRLF
> It also complains because the last line of the patch does not have a CRLF at
> the end.
> 
> Now, I realize that the problem MAY in fact be in the version of patch that
> I am using but it does seem odd to m that the diff should contain mixed CRLF
> and LF chars in one file.

Ok, I can see that can be a problem.  I'll fix this soonishly ;).


Sander

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org