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

Re: is there an svn command to return the latest revision from the repo with addition scripts?

From: Andrey Repin <anrdaemon_at_freemail.ru>
Date: Tue, 23 Jun 2009 11:01:06 +0400

Greetings, baz themail!

> "svn info" or "svn log -l 1" will give too much information. I just want the
> revision number, one number. Is there such a command or i need to do
> something like awk/sed/others?

svn info URL | grep "^Revision:" | sed -E "s#^Revision:[[:space:]]+([[:digit:]]+)#\1#" > ~/latest

Or if you have perl-enabled grep, it's even simpler:

svn info URL | grep -oP "((?<=Revision: )\d+)"

--
WBR,
 Andrey Repin (anrdaemon_at_freemail.ru) 23.06.2009, <10:54>
Sorry for my terrible english...
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2364411
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-06-23 09:06:10 CEST

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.