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

Re: problems applying patches created by tortoiseSVN in linux

From: Joshua Varner <jlvarner_at_gmail.com>
Date: 2005-11-15 04:25:05 CET

On 11/14/05, Stefan Küng <tortoisesvn@gmail.com> wrote:
> Demian Turner wrote:
> > Hi Stefan
> >
> >> "patches created on windows but not with Tortoise have
> >> EOLs automatically dealt with in the patch program".
> >>
> >> So I'd like to know if he used e.g. "patch.exe" to create those
> >> patches that worked, or 'svn diff > patchfile'.
> >
> > I'm afraid I don't create the patches, I just apply them, ie projects devs send
> > stuff into SF and our Trac site on a regular basis and after a while the pattern
> > emerged that patches created with tortoiseSVN never work.
> >
> > So it's an empirical observation, sorry I can't offer more detail than that. I
> > can almost guarantee however that the patches were created with patch.exe which
> > must be what's invoked when you use the Tortoise GUI. "svn diff > patchfile"
> > patches created on linux has never caused a problem.
>
> TortoiseSVN uses the API equivalent of 'svn diff > patchfile', to be
> precise it uses the svn_client_diff() API. So it's highly unlikely that
> only TSVN patches fail to apply but also patches created with the
> command line client svn.exe.
>
> I think you're problem is with you're use of the patch program (I assume
> you don't use TMerge to apply the patches but 'patch' on your linux
> machine).
>
> * Subversion diffs (patches) are in unified diff format, not the default
> patch format.
> * Subversion diffs contain the same lineendings as the files on the
> local system. That means CRLF on windows, LF on linux.
>
> So you have to pass the correct params to your patch program:
> --unified (or -u)
>
It is a known bug that if patches contain lines with svn keywords in them
the patches generated won't apply with patch. Issue #2164, but that
should not be every patch, though it may explain a number of them.

Josh

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Tue Nov 15 04:25:32 2005

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

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