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

Re: What is the easiest way to determine the HEAD revision number?

From: John Peacock <jpeacock_at_rowman.com>
Date: 2004-02-01 13:51:06 CET

Garrick Olson wrote:
> Some code I am writing needs to determine the latest revision number in
> the repository.

Is this not what you want?

> $ svnversion
> usage: svnversion [options] wc_path [trail_url]
> Produce a compact "version number" for the working copy path
> WC_PATH. TRAIL_URL is the trailing portion of the URL used to
> determine if WC_PATH itself is switched (detection of switches
> within WC_PATH does not rely on TRAIL_URL). The version number
> is written to standard output.

NOTE: this is the highest revision for this WC path, which is, I think, what you
are getting from your 'svn log...' call as well. Neither will give the highest
(i.e. most recent) commit to the _entire_ repository. For that, you should use:

> $ svnlook help youngest
> youngest: usage: svnlook youngest REPOS_PATH
> Print the youngest revision number.



John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4720 Boston Way
Lanham, MD 20706
301-459-3366 x.5010
fax 301-429-5747
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sun Feb 1 13:51:07 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.