[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: Blair Zajac <blair_at_orcaware.com>
Date: 2007-07-24 21:41:05 CEST

Kylo Ginsberg 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?
>
> Thanks
> Kylo

I use svn info

svn info $SVNROOT | awk '$1 == "Revision:" {print $2}'

Regards,
Blair

-- 
Blair Zajac, Ph.D.
http://www.orcaware.com/svn/
---------------------------------------------------------------------
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:40:30 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.