> -----Original Message-----
> From: Mark Phippard [mailto:markphip_at_gmail.com]
> Sent: Monday, January 21, 2008 2:28 PM
> To: Michael Pilato
> Cc: Stephen Butler; dev_at_subversion.tigris.org; Paul Burba
> Subject: Re: Repo API -- finding the "last revision" of a file
>
> 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
> > > 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.
>
> 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.
That would be svn_repos_deleted_rev(). Though, as Mark says, it doesn't
do exactly what you are looking for. Rather than finding the last
revision in which a path existed, it finds the first revision in which
it was deleted.
Paul
> 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.
>
> --
> Thanks
>
> Mark Phippard
> http://markphip.blogspot.com/
>
>
---------------------------------------------------------------------
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:50:17 CET