[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: Mark Phippard <markphip_at_gmail.com>
Date: Mon, 21 Jan 2008 14:28:14 -0500

On Jan 21, 2008 2:12 PM, C. Michael Pilato <cmpilato_at_collab.net> wrote:
> 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
> 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.

I recall that Paul Burba added some code that does something, somewhat
like what is wanted. When you run svn status -u, and you have a file
in your WC that has been deleted in the repository, we wanted to be
able to return the revision it was deleted. The code does do this
now. I believe it does a binary search within the fs.

This was done over a year ago, but after 1.4 was released.

Mark Phippard
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-01-21 20:28:31 CET

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