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

svn log question

From: Kevin Longfellow <klongfel_at_yahoo.com>
Date: Wed, 10 Mar 2010 12:49:27 -0800 (PST)


I'm setting up monitoring hourly commits on several repositories and thought something like this would work:

OneHourAgo=`date -d '1 hour ago' +'%F %T'`
DateNow=`date +'%F %T'`
em_result=`svn log -r "{${OneHourAgo}}:{${DateNow}}" file:///${SvnBase}/${1} | egrep "^r.*line|^r.*lines"$ | wc -l`

There likely is an easier or more accurate way to do this but the above will always report a value of 1 even when the HEAD revision does not fall within the specified date as shown below.

svn log -r "{2010-03-10 11:42:20}:{2010-03-10 12:42:20}" file:///misc_sourcectrl01/svnrepositories/svnrepos1
r12138 | user | 2009-07-09 07:41:21 -0700 (Thu, 09 Jul 2009) | 1 line

add the source

It's not a big deal but it does make unused repositories look like there is some activity. Any ideas on a better way to do this or why the command always returns the HEAD revision?

Thanks for any help with this,


Received on 2010-03-10 21:49:56 CET

This is an archived mail posted to the Subversion Users mailing list.