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

Re: [RFC] Identifying copy/move sources

From: John Szakmeister <john_at_szakmeister.net>
Date: 2007-03-31 20:42:16 CEST

Daniel Rall wrote:
> Goal: I need a convenient and efficient way to identify the immediate
> copy/move source path and revision of a specified path and revision.
>
> Use case: The case I have in mind right now revolves around use of
> this copyfrom info in a 'merge' dialog, as part of an algorithm for
> suggesting the most likely merge source (e.g. for a feature branch
> forked off of trunk).
>
> I believe that we should have a public convenience API for retrieving
> this information, rather than requiring library consumers to implement
> it using a log receiver (I've already seen this code used in three
> different places).

+1.

> Possible interface:
>
> a) A stand-alone API which can be called by library consumers. The
> svn_clien_copyfrom_info() API, as defined in the attached patch, is an
> example.
>
> b) New "retrieve_copyfrom_info" flag for the svn_client_info() API,
> and expanded semantics for use of svn_info_t's copyfrom_path and
> copyfrom_rev fields. This flag would exist to avoid potentially
> expensive processing for callers which don't need coypfrom info, and
> maintain backwards compatibility.
>
> Implementation questions:
>
> Is there a more efficient way to implement this lookup than through a
> custom log receiver (as in the attached patch)? Using a log receiver
> written directly against libsvn_repos doesn't seem to buy us much in
> terms of efficiency -- the copyfrom info lookup remains an O(N)
> operation.
>
> Thoughts?

I've done some poking around, and currently, the only way to get this
client-side is through the log receiver. :-( If you're operating
server-side, I think svn_fs_closest_copy() does the trick. My vote
would be for this to be included as part of 'svn info' (I've done the
log thing with a couple of scripts already), but I'm not stuck on that.

-John

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Mar 31 20:43:10 2007

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.