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

Re: Repo API -- finding the "last revision" of a file

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Mon, 21 Jan 2008 14:12:27 -0500

Stephen Butler wrote:
> Our question is, how to we find the last revision at which Foo.c
> existed in branches/mybranch? Can we simply call
> svn_client__repos_location_segments() with the following args?
>
> path: "Foo.c"
> peg_revision: SVN_INVALID_REVNUM
> start_rev: BASE
> end_rev: SVN_INVALID_REVNUM

That won't work.

And there currently is no easy to answer the question. Remember, Subversion
models the deletion of an item as the removal of its entry in its parent
directory. So there is record attached to a given line of history of the
end of that line of history.

Applications like ViewVC use a binary search to answer this question, but
ViewVC has the advantage of being server-side already. Ideally, we'd have
an RA API that answered the question, which would allow the server side to
become more optimal as we enhanced the knowledge housed in the repository.
Today, though, no such RA API exists.

-- 
C. Michael Pilato <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Received on 2008-01-21 20:12:38 CET

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