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

Re: Subversion repository most-recent revision number

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Tue, 08 Jan 2008 11:16:44 -0500

Xypanastheu wrote:
> I am trying to write a small Windows console application
> that uses the SVN client C++ API
> to get the latest / most-recent revision number
> from a Subversion repository out on the server.

Your mail is misdirected: this list is for discussion around the development
*of* Subversion, not any ol' development *atop* Subversion.

That said, if all you want to do is display the youngest revision number
from a repository, you should consider using svn_ra_get_latest_revnum

   /**
    * Get the latest revision number from the repository of @a session.
    *
    * Use @a pool for memory allocation.
    *
    * @since New in 1.2.
    */
   svn_error_t *svn_ra_get_latest_revnum(svn_ra_session_t *session,
                                         svn_revnum_t *latest_revnum,
                                         apr_pool_t *pool);

You can use the example program svnput.c[1] to see how to do this in C --
not sure what the C++ API looks like around this area. (svnput.c does more
than what you are asking for, but would work as an example.)

[1] http://svn.collab.net/repos/svn/trunk/tools/examples/svnput.c

-- 
C. Michael Pilato <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Received on 2008-01-08 17:39:46 CET

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