[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: Stefan Küng <tortoisesvn_at_gmail.com>
Date: 2005-11-14 18:17:44 CET

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)

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Mon Nov 14 18:20:18 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.