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

Re: svn log and revision date ranges

From: Hari Kodungallur <hkodungallur_at_gmail.com>
Date: 2007-06-25 00:45:19 CEST

On 6/23/07, Ryan Schmidt <subversion-2007b@ryandesign.com> wrote:
>
> On Jun 23, 2007, at 07:20, Karl Heinz Marbaise wrote:
>
> > i'm a little bit confused, cause i'm trying to do some scripting with
> > the following:
> > (LC_ALL and TZ used, cause in germany i have different time zone).
> >
> >
> > export LC_ALL=en_US;export TZ=UTC; \
> > svn log -q http://svn.traveler/jagosi \
> > --revision "{2007-06-21 00:00:00 +0000}":"{2007-06-21 23:59:59
> > +0000}"
> >
> > What i get as output by the above command was the following:
> >
> > ----------------------------------------------------------------------
> > --
> > r61 | kama | 2007-06-19 16:26:34 +0000 (Tue, 19 Jun 2007)
> > ----------------------------------------------------------------------
> > --
> > r62 | kama | 2007-06-21 17:11:46 +0000 (Thu, 21 Jun 2007)
> > ----------------------------------------------------------------------
> > --
> > r63 | kama | 2007-06-21 17:13:24 +0000 (Thu, 21 Jun 2007)
> > ----------------------------------------------------------------------
> > --
> > r64 | kama | 2007-06-21 18:14:49 +0000 (Thu, 21 Jun 2007)
> > ----------------------------------------------------------------------
> > --
> > r65 | kama | 2007-06-21 18:26:09 +0000 (Thu, 21 Jun 2007)
> > ----------------------------------------------------------------------
> > --
> >
> > I didn't expect to get the revision 61, cause it's completley out
> > of the
> > range of the given timeframe...of June 21
> >
> > I have read in book may be i didn't understand that well,
> > but i think this is a little bit confusing.
>
> When you ask for revision "{2007-06-21 00:00:00 +0000}", Subversion
> gives you the closest revision on or _before_ that date and time,
> which is r61 in your case.
>
> It's explained here, in the box titled "Is Subversion a Day Early?"
>
> http://svnbook.red-bean.com/en/1.2/
> svn.tour.revs.html#svn.tour.revs.dates
>

Actually, the "day early" thing is applicable only if the time is not
specified. Isn't that true? In this case the time and the timezone offset
are both provided and so, it should not be the case, I thought.
And from my understanding, even if the time is not provided, the "day early"
thing happens only because the time defaults to 00:00:00. So, if the
revision range is say:

-r {2007-06-21}:{2007-06-22}

then, what you actually get is

-r {"2007-06-21 00:00:00"}:{"2007-06-22 00:00:00"}

This essentially means, the search will limit to all the check-in on 21st
(plus anything that happened at the stroke of midnight between 21st and
22nd).

The timezone offset is something that I have not understood well. But my
guess is that, if you do provide the offset, the time is calculated as UTC
plus whatever offset is provided.

So, {"2007-06-21 00:00:00"} becomes local time 21st midnight.
And {"2007-06-21 00:00:00 +0700"} becomes UTC + 7 hours. I am in PDT, which
is UTC - 7 hours. So, the time in local time becomes {"2007-06-20
10:00:00"}.
It seems to me that this assumption is right. But I am not entirely sure.

Anyway, about the original email from Karl, I think that r61 should not have
been shown in the log.

Thanks!
-Hari Kodungallur
Received on Mon Jun 25 00:45:11 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.