Just to clarify. My point was that if I open commit window in WC root, I would like to see paths in patch based on WC root. If I open commit window in WC subfolder, I would like to see paths in patch based on this folder. To put it in another words, personally think that svn diff behavior is most reasonable and simultaneously fully flexible.
пт, 29 июл. 2022 г., 20:44 Daniel Sahlberg via TortoiseSVN < [email protected]>: > I was under the impression that the svn command line client always based > the diffs in the WC root, but I realise now that I was wrong. > > In the example below, dev is just a regular directory and > subversion_private is the wc root. As show by the example, the svn command > line client adds the dev directory as well as the wc root directory (both > which are irrelevant to the patch in relation to the repository). If the > diff is done from the services subdirectory, it adds no path at all. > [[[ > D:\>svn diff dev\subversion_private\ > Index: dev/subversion_private/services/freenode-IRC.txt > =================================================================== > --- dev/subversion_private/services/freenode-IRC.txt (revision 107775) > +++ dev/subversion_private/services/freenode-IRC.txt (working copy) > [...] > D:\Dev\subversion_private\services>svn diff > Index: freenode-IRC.txt > =================================================================== > --- freenode-IRC.txt (revision 107775) > +++ freenode-IRC.txt (working copy) > ]]] > > I believe TortoiseSVN fares no worse than the svn command line client and > I think the behaviour is quite reasonable. Especially the case made by > Stefan with A and B makes sense. > > I will retract my previous statement about always basing the patch in the > WC root. Of course this could be added as a configurable behaviour in case > it is important to someone, but personally I have more urgent itches to > scratch. > > Kind regards, > Daniel > fredag 29 juli 2022 kl. 19:13:37 UTC+2 skrev Stefan: > >> Sorry, I'm a little late to this discussion. But here's my input: >> As already discovered, creating a patch with the appropriate command >> creates a patch with relative paths from where the patch is created. >> As a matter of fact, all "create patch/diff" commands always create the >> paths in the patch file relative to from where they're started, or when >> from a status control (like in the commit dialog) with the lowest common >> denominator as the root. >> >> The point is that these are *relative *paths, so they're actually >> relative :) >> >> I guess all of you in this discussion thread work in a team where >> everyone has checked out from the same 'root' of a repo (e.g. trunk). So >> you maybe expect those commands to always use the wc root as the root of >> the relative paths. But many teams don't work that way, especially those >> that have >100GB working copies if checked out from trunk - in such teams >> it happens that different team members have different subfolders checked >> out. So there the relative path is relative to their working copies. Now >> imagine person A has /trunk checked out because that person maybe also does >> a full build of the project. Person B has only /trunk/subProject1 checked >> out. Person A needs to send B a patch of some files in subProject1, so if >> TSVN would always create the patch with paths relative to the WC root, >> person B would get a patch that can't be applied because the paths would >> contain /subProject1/file1.cpp, and the WC might be named subProject1-test >> - so that part's wouldn't match. >> In this case, person A can create the patch from subProject1 instead of >> the wc root and get a patch that person B can apply. >> >> I hope my explanation on why this is done in TSVN like this wasn't too >> long.... >> >> Stefan >> >> >> -- > You received this message because you are subscribed to a topic in the > Google Groups "TortoiseSVN" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/tortoisesvn/F8N_bikqPaE/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/tortoisesvn/166abd47-08d9-4b44-96cd-ec8513f0571dn%40googlegroups.com > <https://groups.google.com/d/msgid/tortoisesvn/166abd47-08d9-4b44-96cd-ec8513f0571dn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/tortoisesvn/CAL-cVeiW%3DRyNuCzZN45h4K6F-rM%2BY%3DGi2iTovxbgYZsRY7wqyg%40mail.gmail.com.
