[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: [WIP] Enable passing copyfrom information for the diff code when dealing with repository diffs.

From: Bert Huijben <bert_at_vmoo.com>
Date: Sun, 15 Aug 2010 23:18:46 -0700

> -----Original Message-----
> From: Daniel Näslund [mailto:daniel_at_longitudo.com]
> Sent: zondag 15 augustus 2010 12:27
> To: dev_at_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
> Send copyfrom-args on updates *only* if the client explicitly requests
> 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

Received on 2010-08-16 08:19:58 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.