[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-16 17:43:31 CET

Demian Turner wrote:
> Hi all
>
>> 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.
>
> Here's an example of patch created in windows with TortoiseSVN that will not
> apply in linux:
>
> http://trac.seagullproject.org/attachment/ticket/193/patch.diff
>
> Output:
>
> [demian@localhost trunk]$ patch -p0 --dry-run < patch.diff
> (Stripping trailing CRs from patch.)
> patching file modules/navigation/classes/CategoryMgr.php
> Hunk #1 FAILED at 59.
> Hunk #2 FAILED at 83.
> Hunk #3 FAILED at 96.
> Hunk #4 FAILED at 308.
> Hunk #5 FAILED at 325.
> Hunk #6 FAILED at 363.
> 6 out of 6 hunks FAILED -- saving rejects to file
> modules/navigation/classes/CategoryMgr.php.rej
>
> I also tried this with a -u switch as suggested earlier, same outcome. You can
> recreate this scenario by checking out the above repo at rev 752 from here:
>
> http://svn.seagullproject.org/svn/seagull/trunk/
>
> and trying to apply the patch. The patch applies fine in widows using the
> TortoiseSVN right-click 'apply patch'.
>
> Any feeback would be most appreciated.

You're not alone ;)

http://lists.gnu.org/archive/html/bug-gnu-utils/2005-09/msg00027.html

But even though that mail states that the diffutils are broken, it's
really the patch tool that's broken and assumes something that isn't.

I'd recommend that you run those patchfiles through a lineending
converter, which converts DOS/Windows lineendings to UNIX lineendings.
Then you should be able to apply those patches generated on windows.

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 Wed Nov 16 17:44:09 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.