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

Re: unusual results with svn log

From: Ryan Schmidt <subversion-2009b_at_ryandesign.com>
Date: Fri, 18 Sep 2009 04:52:28 -0500

On Sep 17, 2009, at 17:45, William Yardley wrote:

> We are getting some situations (not all the time) where a particular
> entry seems to keep showing up in the svn log messages, even when that
> entry is no longer in the time range we're specifying. Is there
> something wrong with the way I'm specifying the time?

> $ svn log -v -r {"2009-09-17 00:00:00 -0700"}:{"2009-09-17 23:59:00
> -0700"}
> ------------------------------------------------------------------------
> r1011 | wby | 2009-09-15 11:12:13 -0700 (Tue, 15 Sep 2009) | 2 lines
> [.....]
>
> [below here are a bunch of other revisions that actually *is* from the
> time period specified]

The first revision returned by "svn log -r A:B" will have a date
before A. It could be one second before A, or it could be a year
before -- whatever revision occurred immediately prior. If you don't
want revisions outside of your specified range, ignore the first
revision returned.

For more information, read the box "Is Subversion a Day Early?" in
this part of the book:

http://svnbook.red-bean.com/en/1.5/svn.tour.revs.specifiers.html#svn.tour.revs.dates

For example:

$ svn log -q -r '{2009-09-18 00:00:00}:{2009-09-18 04:00:00}' \
http://svn.collab.net/repos/svn/trunk/
------------------------------------------------------------------------
r39415 | hwright | 2009-09-17 21:51:44 -0500 (Thu, 17 Sep 2009)
------------------------------------------------------------------------
r39416 | rhuijben | 2009-09-18 03:11:35 -0500 (Fri, 18 Sep 2009)
------------------------------------------------------------------------
r39417 | rhuijben | 2009-09-18 03:52:29 -0500 (Fri, 18 Sep 2009)
------------------------------------------------------------------------
r39418 | stsp | 2009-09-18 03:56:38 -0500 (Fri, 18 Sep 2009)
------------------------------------------------------------------------

As you see, I get all revisions that occurred in the first four hours
of today -- and one more. If I don't want the one more, I simply
ignore the first entry:

$ svn log -q -r '{2009-09-18 00:00:00}:{2009-09-18 04:00:00}' \
> http://svn.collab.net/repos/svn/trunk/ | sed 1,2d
------------------------------------------------------------------------
r39416 | rhuijben | 2009-09-18 03:11:35 -0500 (Fri, 18 Sep 2009)
------------------------------------------------------------------------
r39417 | rhuijben | 2009-09-18 03:52:29 -0500 (Fri, 18 Sep 2009)
------------------------------------------------------------------------
r39418 | stsp | 2009-09-18 03:56:38 -0500 (Fri, 18 Sep 2009)
------------------------------------------------------------------------
$

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2396326

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-09-18 11:53:25 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.