Subversion: See the Latest Repository Revision Number

Posted November 20, 2006 by johnnythawte in Computer programming

The Subversion source control system has a simple and easy to use command-line syntax. This recipe shows you how to see what the latest revision number in the repository is.


The svn info command takes either local or url arguments. This will let you tell what the version on the repository is compared to the version of your local directory.

First run the command on your local copy:
svn info

You should see output similar to this:
URL: http://svn.myweb.com/myproject
Repository Root: http://svn.myweb.com/myproject
Repository UUID: c656a9d0-4e1d-0410-b48a-e17619d8371c
Revision: 291
Node Kind: directory
Schedule: normal
Last Changed Rev: 291
Last Changed Date: 2006-09-13 01:10:52 -0400 (Wed, 13 Sep 2006)

Your local copy is at revision 291, now let’s take a look at what revision is out there on the server. We will use the URL of our web repository, which you can see in the output above.
svn info http://svn.myweb.com/myproject

Here’s an example of the output of that command:
URL: http://svn.myweb.com/myproject
Repository Root: http://svn.myweb.com/myproject
Repository UUID: c656a9d0-4e1d-0410-b48a-e17619d8371c
Revision: 382
Node Kind: directory
Schedule: normal
Last Changed Author: Bigshot
Last Changed Rev: 382
Last Changed Date: 2006-11-19 11:05:12 -0400 (Wed, 19 Nov 2006)

Yikes! We’re really out of date. Time to run the svn update command to bring us up to date with the current repository.

The Conversation

Follow the reactions below and share your own thoughts.