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

Re: Getting HEAD revision number from a URL

From: Rob Hills <rob_at_netpaver.com.au>
Date: 2004-10-26 07:43:31 CEST

Hi All,

On 25 Oct 2004 at 22:57, Ben Collins-Sussman wrote:

> On Oct 25, 2004, at 6:40 PM, Garrick Olson wrote:
> >
> >> Nevertheless, there *is* a network API call for this in svn_ra.h.
> >> Just
> >
> >> run RA->get_latest_revnum().
> >
> > I am not very familiar with that API. Does it get the latest revision
> > for the entire repository, or the latest revision (that contains
> > changes) for a path within the repository?
>
> It sounds like you're missing a fundamental SVN concept. The
> repository has a single, global revision number. There's no such thing
> as "the latest revnum of a path".

I understand this, but for any subtree within the repository, the last revision to any file
within that subtree won't always be the same as the last revision to the head.

This becomes important if you have a tree containing a number of different projects
as we do, something like:

/projects/project1
/projects/project2

etc. The last revision for project1 won't necessarily be the last revision for project2 or
for the head. I understand from discussion on this issue that for Subversion to do this
currently, it would have to search the entire subtree looking for the latest revision
which I agree would be a pain. However, if Subversion were to store the latest
revision value for each folder at commit time, this would require much less processor
effort and would then make it a trivial exercise to retrieve the latest revision for any
level within the subtree below the head.

> >> It took me 1 minute to modify from tools/examples/svnput.c.
> >
> > Does that mean it would only take a couple minutes to commit it? :)
>
> If folks find it useful, sure.

We'd certainly find it useful, even if only for the Head.

Cheers,

Rob Hills

Rob Hills
MBBS, Grad Dip Com Stud, MACS
Senior Consultant
Netpaver Web Solutions
Tel: (08) 9485 2555
Mob: (0412) 904 357
Fax: (08) 9485 2555

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Oct 26 07:41:27 2004

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.