> -----Original Message----- > From: Daniel Näslund [mailto:dan...@longitudo.com] > Sent: zondag 15 augustus 2010 12:27 > To: dev@subversion.apache.org > Subject: [WIP] Enable passing copyfrom information for the diff code when > dealing with repository diffs. > > Hi! > > Why doesn't svn_ra_do_diff3() request that the repository sends copyfrom > args? The best explanation I've found is this commit message: > > ------------------------------------------------------------------------ > r866577 | sussman | 2007-09-10 06:56:55 +0200 (mån, 10 sep 2007) | 87 lines > > Send copyfrom-args on updates *only* if the client explicitly requests them. > > This keeps the 1.5 servers backward-compatible. Because incoming > copyfrom args cause old clients to error, they should only be > requested by new clients that understand them. This means adding a > new boolean 'send_copyfrom_args' to the main libsvn_repos > editor-driver, svn_ra_do_update2(), and all four RA implementations. > Eesh! > > [.. Rest of log message omitted for brevity ..] > > I'm assuming noone saw a use case for having diff display copies back then > and > since it involved passing down a lot of parameters, only > svn_ra_do_updateX() > was revved. But with git diffs we have a use case for copyfrom info. How > about > enable it? There's a WIP patch attached to this mail. I haven't done any > wrapper > for svn_ra_do_diff3() though. A log message:
Note that this copyfrom info will probably be send in more cases then you expect. Even if the file was copied a few revisions ago it can still receive copyfrom information! (At least that is the behavior I see in the update editor.) In some cases it can still be more efficient to say that it was originally a copy from that source, but with a few revisions of changes applied on them. And that is what you see in the update editor. So you don't get stable direct copy information from the update editor when you use this. (But you do get that info if you use the replay API). In simple testcases it will probably do exactly what you expect (and like to see), but please verify that you don't get more copies than just those. (In our repository you can find, subversion/libsvn_wc/cleanup.c and tools/dev/wc-ng/count-progress.py, which are nice examples of files with multiple revisions after the copy that you will still get as copied from the old location... Exactly those that missed their actual properties before r985254) Bert