[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: Travis P <svn_at_castle.fastmail.fm>
Date: 2004-10-26 07:14:04 CEST

On Oct 25, 2004, at 10:57 PM, 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 think Garrick would like the single, global revision number when
something at a specified location or anywhere in the subhierarchy was
last changed?

Garrick, if I'm understanding you righ

Here might be one way
   svn ls -R -v <URL-to-some-dir>
and then for that "some-dir" itself, it looks like you'd need to do an
ls on its parent and extract that one rev num you care about for
"some-dir":
   svn ls -v <URL-to-some-dir's-parent>
Then, after you've collected all the rev nums, the max one is the
latest change.

On further thought, I think this gives the same result much more
quickly:
   svn log --quiet URL | head

-Travis

---------------------------------------------------------------------
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:14:29 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.