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

Re: Best practice for getting most recent revision number?

From: Larry Martell <larry.martell_at_gmail.com>
Date: 2007-07-24 21:42:23 CEST

On 7/24/07, Kylo Ginsberg <kylo.ginsberg@gmail.com> wrote:
> Right now I do this in a script like so:
> rev=`svn log $SVNROOT -q -r HEAD | grep "^r" | cut -f 1 -d" " | cut -c2-`
>
> Works fine, but a little clunky, not to mention dependent on the format of
> log output. Is there a better way?

'Better' is in the eye of the beholder. Here's how I do it:

svn info | grep 'Revision:' | sed 's/.*: //g'

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Jul 24 21:41:24 2007

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.