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

406 views
Skip to first unread message

Chris Duncan

unread,
Dec 23, 2011, 1:41:52 AM12/23/11
to us...@tortoisesvn.tigris.org
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

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 a pretty serious bug for anyone who is accepting patches in their use of svn, and means that I may have to uninstall tortoise until it is fixed.

Let me know if you need more info,
thx,
chris

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

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

Stefan Küng

unread,
Dec 23, 2011, 5:07:51 AM12/23/11
to us...@tortoisesvn.tigris.org
On Fri, Dec 23, 2011 at 07:41, Chris Duncan <veq...@hotmail.com> wrote:
> 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
>
> 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 a pretty serious bug for anyone who is accepting patches in their use of svn, and means that I may have to uninstall tortoise until it is fixed.
>
> Let me know if you need more info,


You have to report this on the svn mailing list: TSVN in version 1.7
uses the new 'svn patch' command to apply the patches.

Stefan

--
       ___
  oo  // \\      "De Chelonian Mobile"
 (_,\/ \_/ \     TortoiseSVN
   \ \_/_\_/>    The coolest Interface to (Sub)Version Control
   /_/   \_\     http://tortoisesvn.net

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

Chris Duncan

unread,
Dec 23, 2011, 1:11:45 PM12/23/11
to us...@tortoisesvn.tigris.org
Ok, I've sent an email to us...@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

Updating_PBEM_system.patch
Updating_PBEM_system_v2.patch

Stefan Küng

unread,
Dec 23, 2011, 4:55:38 PM12/23/11
to us...@tortoisesvn.tigris.org, Chris Duncan
On 23.12.2011 19:11, Chris Duncan wrote:
> Ok, I've sent an email to us...@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)

I've opened issue #174 for this:
http://code.google.com/p/tortoisesvn/issues/detail?id=174

> 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.

patching in TSVN 1.7 is done with the svn library patch function. That
function does not support renames (yet).
You can ask on their mailing list if/when that gets implemented (users
at subversion.apache.org)

> 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.

That works fine with my latest build from trunk.
Maybe this is already fixed on the svn 1.7.x branch?

Stefan

--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest Interface to (Sub)Version Control
/_/ \_\ http://tortoisesvn.net

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

Reply all
Reply to author
Forward
0 new messages