TortoiseSVN Apply Patch error
Asked Answered
R

6

16

I am trying to apply patch but I get a blank error message (there is no text in it or anything). I have latest version of TortoiseSVN.

Rogatory answered 13/8, 2012 at 18:27 Comment(3)
Welcome to SO Michael! There's not much to go on in your question. Can you provide any additional details? If not, it may be best to go to Tortoise's website and ask there.Remainderman
Still getting this error in 2020; surprised Tortoise hasn't fixed it yet after all these years!Semiprofessional
If you get a blank window, it can also be that you did not nofiy the floating window that also is popped up that contains the filenames for the files that are included in the patch. There is a button to patch all files in that floating window.Dato
H
10

I had the same issue, if you have created the patch from the revision, using "Show changes as unified diff", check the paths in your patch file, this one is correct:

Folder/FileName.cs

But this one (with absolute path) will cause issues:

c:/Folder/FileName.cs

Just convert absolute to relative paths.

Huskamp answered 20/9, 2012 at 13:57 Comment(3)
Udiff files from Trac 0.11 have absolute paths and cause this blank error dialog in TortoiseSVN-> apply patch. Similar fix (make paths relative to root of your working directory) applies.Amal
I've fixed this the way @Amal suggested. Open the files and replace all c:/ instances with / and the diff file should work correctly.Motorcar
Thanks @Ivan Jovovic for correct answer. You saved lots of time for me :)Racer
L
6

Having a look here, seems to be 3 possible root causes to this empty error svn patch issue:

  • the patch file is empty (or is invalid so the patch data appears to be empty)

  • the patch is not applied to the correct directory (auto-dir-search works on trunk now)

  • the patch file uses absolute paths instead of relative ones (trunk already strips such paths automatically)

first is probably not yours, most probably you ought to use relative path instead of absolute one

Lavatory answered 27/6, 2013 at 20:30 Comment(0)
P
3

I get this message all the time. This is usually because I right click in windows explorer to get to the tortoise log. When you use "Show differences as unified diff" from this context, the generated patch will contain absolute locations relative to your computer, such as "c:\source\". If you try to apply this patch to another directory, this will fail.

The solution is to use the repository browser from tortoise, then use the "show log" menu from this context. The generated patches will have relative locations and you will be able to apply those patches anywhere the relative paths are matched.

Pepito answered 18/2, 2014 at 21:5 Comment(0)
F
0

I have also faced this problem and fixed it by changing the path in patch file. In my case i have to patch just one file. The problem occurred because in my case i created patch file from the review-board which creates files with full link path. INDEX /home/pushpendra/...something/file.c (revision some_rev)

So i replaced this line with:

INDEX file.c (revision some_rev) and then right click on this file and then apply patch.

Forceps answered 11/6, 2015 at 10:29 Comment(0)
V
0

I had the same issue.

Problem was:

  • I checked out: some/crazy/path
  • The patch was for: this/is/some/crazy/path

Somehow Tortoise could not apply the patch, so I checked it out on a higher level and it worked.

Visional answered 28/8, 2019 at 5:14 Comment(0)
E
0

Patch can not be applied if version on which patch is created and the version on which patch is applied is different.

Ellis answered 22/7, 2021 at 17:17 Comment(1)
That just cant be correct.Dato

© 2022 - 2024 — McMap. All rights reserved.