0
votes

Now a little elaboration:

Say lot of revisions are there in the svn database and I want to extract out or see it on the terminal from svn cli..how to do that?

For instance:

shell> svn rev url

would print the revision number

122+date 123+date

I DO NOT need the local working version. Which can be obtained by svn info command.

3

3 Answers

4
votes

svn info does take in a URL parameter which will give you info on a remote repository ( without needing a working copy)

svn info url

http://svnbook.red-bean.com/en/1.5/svn.ref.svn.c.info.html

2
votes

You can use svn info or svn log. For example:

$ svn log -q --limit 1 http://svn.apache.org/repos/asf
------------------------------------------------------------------------
r1172722 | dkulp | 2011-09-19 13:29:02 -0400 (Mon, 19 Sep 2011)
------------------------------------------------------------------------


$ svn info http://svn.apache.org/repos/asf
Path: asf
URL: http://svn.apache.org/repos/asf
Repository Root: http://svn.apache.org/repos/asf
Repository UUID: 13f79535-47bb-0310-9956-ffa450edef68
Revision: 1172722
Node Kind: directory
Last Changed Author: dkulp
Last Changed Rev: 1172722
Last Changed Date: 2011-09-19 13:29:02 -0400 (Mon, 19 Sep 2011)

Both commands take an optional --xml option if you prefer XML output for parsing.

1
votes

You can use this command if i understand well :

svn log -l 1

This will display the last entry in your svn log for example :

r1408 | vlad | 2011-09-19 19:09:37 +0300 (Mon, 19 Sep 2011) | 1 line