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

RE: Re: tortoise svn 1.7.3 bug: applying patches fail if there is a new directory in the patch

From: Chris Duncan <veqryn_at_hotmail.com>
Date: Fri, 23 Dec 2011 10:11:45 -0800 (PST)

Ok, I've sent an email to users_at_tortoisesvn.tigris.org
If that is wrong, or I need to subscribe first, let me know please.
Email content is below:

I have 1-3 bugs to report,

1st:
Updating_PBEM_system.patch
I have a patch where someone added a file to a new directory. The patch file works when I apply it using Tortoise SVN 1.6.x, however it fails with Tortoise 1.7.3
By that i mean it fails completely, and will not let me even apply parts of the patch. It just exists after the error message. (doing right click -> apply patch)

The message is:
"The Node
blah../../newDirectory
was not found"

example:
My current workspace has blah1/
And someone made a patch that adds this file to blah1/blah2/file.txt

This is bug #1.
When I tried to apply this patch using Tortoise SVN 1.6.x on a different computer, the patch worked for all the files it was modifying except for 1 file, which was done incorrectly. I guess this one incorrect file could be causing the error above, but it should be noted that the 1 file that was done incorrectly in the patch file was NOT one of the files that was in a new directory. The badly done file was an already existing file.
(Index: src/games/puzzle/tictactoe/TicTacToe.java was the single 'file' inside of the patch that did not work)

2nd:
Updating_PBEM_system.patch
So, using the other computer running tortoise svn 1.6.x, I applied the patch file to my workspace. I applied all changes except the one to TicTacToe.java, and then I did the changes to TicTacToe manually based on looking at the patch file.

I noticed that applying the patch did not change the names of some files,
example:
Index: src/games/strategy/triplea/pbem/AxisAndAlliesDotOrgPBEMMessenger.java
===================================================================
--- src/games/strategy/triplea/pbem/AxisAndAlliesDotOrgPBEMMessenger.java (revision 3313)
+++ src/games/strategy/triplea/pbem/AxisAndAlliesForumPoster.java (revision )

According to what i know, it should change the name of the file. Anyway, I had to do it manually. This is bug #2.

3rd:
Updating_PBEM_system_V2.patch
After this, I created a new patch file on my Tortoise SVN 1.6.x machine (tortoise svn 1.6, right click -> create patch file), that way I could send it back to my colleague.
I decided to see if this patch file would work on my Tortoise SVN 1.7.3 machine, so I tried that.
Amazingly it sort-of worked.
However, it showed 11 of the 'files' in the patch to be Red. When I clicked on any of these, the message was "Rejected patch hunk for ......"
The rejected 11 were all the ones in the new directory.
This is bug #3.

In case you want to try applying these patches yourself, I have included them. The SVN repository I am using, and applying these patches to my local copy of, is located here:
http://sourceforge.net/scm/?type=svn&group_id=44492
Please only checkout this repository to revision 3375, as that is the revision I was using when I got these 3 bugs (and i plan to do more commits in later today, which would ruin your attempt to apply these patches).
Let me know if you need more info,
thanks,
Chris

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2899409

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].

Received on 2011-12-23 19:12:28 CET

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