[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: Geir Engebakken <geir.engebakken_at_edb.com>
Date: Wed, 24 Jun 2009 15:20:06 +0200

Or maybe this is easier too :

svn info URL| grep ^Revision: | cut -f2 -d' '

Geir

-----Original Message-----
From: Andrey Repin [mailto:anrdaemon_at_freemail.ru]
Sent: 23. juni 2009 09:01
To: baz themail; users_at_subversion.tigris.org
Subject: Re: is there an svn command to return the latest revision from the repo with addition scripts?

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].
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2364928
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-06-24 15:21:09 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.