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

Re: determine latest repo revision?

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2004-02-23 06:40:51 CET

Holger Krekel wrote:
> hi,
>
> given an arbitrary svn url and the 'svn' commandline client,
>
> a) what is an efficient algorithm/way to determine the latest
> revision of the whole repository?

'svn st -u' and look at the last line printed.

>
> b) how to determine if URL points to a file or a directory?
>

'svn ls -v'. Or if you're using the API, call RA->check_path()

> c) obtain the base url of the underlying repository
>
> Currently i am trying 'svn ls -v' and traversing up the
> url path but it's slow and somehwat fragile.

That's all you can do. The svn client library has no separate concepts
of "Repository Root" and "Path within the Repository". At the moment,
there's no way for an svn client to know where that line is drawn in the
middle of the URL. Your technique is probably the best there is.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Feb 23 06:41:34 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.