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

[RFC] Identifying copy/move sources

From: Daniel Rall <dlr_at_collab.net>
Date: 2007-03-31 00:32:29 CEST

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).

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?

  • application/pgp-signature attachment: stored
Received on Sat Mar 31 00:33:01 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.