I saw this as well a while ago, discussed as part of another thread in tortoisesvn-dev https://groups.google.com/g/tortoisesvn-dev/c/aw32jamqpCw
TLDR; it would probably be a nice improvement to TortoiseProc to base the patches in the root of the working copy but no-one has looked at it since TortoiseMerge usually works out finding the correct file to patch. Anyone looking for a summer project would be welcome to fix this. Kind regards, Daniel fredag 29 juli 2022 kl. 10:55:37 UTC+2 skrev Ivan Zuboff: > But then my question can be phrased another way: is this expected and > right behavior that creating patches from commit window work this weird > way, different from "Create patch" button after right-click on the repo and > different from svn diff on the command line? > > (Sorry for repetion, I think I should put this question it in a separate > email for visibility.) > > пятница, 29 июля 2022 г. в 11:44:49 UTC+3, Ivan Zuboff: > >> >> Tony, thank you very much for your input! Indeed, right click on >> repository and pressing "Create patch" gives expected result. >> >> I used another way to create a patch. In TortoiseSVN-1.14.3.29387 on >> Windows 10 I usually right-click on marked files in commit window and then >> click "Create patch". Patches created this way don't have relative paths >> inside, as I described above. >> [image: a.jpg] >> >> Resulting patch: >> >> Index: BUILD-CC.txt >> =================================================================== >> --- BUILD-CC.txt (revision 244744) >> +++ BUILD-CC.txt (working copy) >> *some changes here* >> >> So, you sort of fixed my problem. With your help, I now know how to >> create "right" patches not only from command line, but also from GUI. >> Massive thanks! >> >> But then my question can be phrased another way: is this expected and >> right behavior that creating patches from commit window work this weird >> way, different from "Create patch" button after right-click on the repo and >> different from svn diff on the command line? >> >> пятница, 29 июля 2022 г. в 06:04:17 UTC+3, Tony Rietwyk: >> >>> I don't have any problem creating a patch via TortoiseSVN / Create >>> patch... on the root - it includes relative paths as expected. [image: >>> tortoisesvn patch.png] >>> >>> On Thursday, 28 July 2022 at 20:13:39 UTC+10 Ivan Zuboff wrote: >>> >>>> Console command "svn diff" from the root of the repo shows patch/diff >>>> with long relative paths, contrary to TortoiseSVN from the root while >>>> creating patch or showing unified diff. >>>> >>>> четверг, 28 июля 2022 г. в 13:05:25 UTC+3, Ivan Zuboff: >>>> >>>>> Hello! >>>>> >>>>> Say I'm having a repo with the following structure: /a/1, where a is >>>>> folder and 1 is file in this folder. If I edit file "1" and create a >>>>> patch >>>>> from the top of my repo, it will contain no relative path mentioning "a" >>>>> folder": >>>>> Index: 1 >>>>> =================================================================== >>>>> --- 1 (revision 123) >>>>> +++ 1 (working copy) >>>>> // changes here >>>>> >>>>> This causes guessing when applying the patch. Obviously guessing is >>>>> not always working right in non-trivial repository. When I edit Makefile >>>>> in >>>>> some subfolder and do nothing else, my patch doesn't contain any clue >>>>> about >>>>> what Makefile exactly should be patched. Sadly, this is a long-standing >>>>> problem for me and my collegues with TortoiseSVN. >>>>> >>>>> If repo would also contain file /2 and I would edit it too, then patch >>>>> would look different (like I would like to see it): I would get "a/1" >>>>> instead of just "1" and guessing would work much better on applying. >>>>> >>>>> Can I always create a patch with relative paths ("a/1" instead of "1") >>>>> via TortoiseSVN? Is there any option that enables this behavior? >>>>> >>>>> Thank you very much in advance. >>>>> >>>>> Best regards, Ivan >>>> >>>> -- You received this message because you are subscribed to the Google Groups "TortoiseSVN" group. To unsubscribe from this group and stop receiving emails from it, send an email to tortoisesvn+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/tortoisesvn/b5220ee2-93f2-472d-b65a-4397a9657f7en%40googlegroups.com.