You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Wellington Fan <wi...@gmail.com> on 2008/10/14 19:12:36 UTC

svn log and date range

Hello all,

I thought that I understood the -r{DATE1}:{DATE2} syntax to grab all
transactions from 00:00:00 of DATE1 to 00:00:00 of DATE2. I am using
svn, version 1.5.1 (r32289).

I issue the following commands and get unexpected results, numbered for
easy reference:

(1)
$ svn log -r{2008-10-10}:{2008-10-11} -q
------------------------------------------------------------------------
r596 | wfan | 2008-10-08 18:30:49 -0400 (Wed, 08 Oct 2008)
------------------------------------------------------------------------
r597 | wfan | 2008-10-10 10:58:09 -0400 (Fri, 10 Oct 2008)
------------------------------------------------------------------------
r599 | wfan | 2008-10-10 13:37:04 -0400 (Fri, 10 Oct 2008)
------------------------------------------------------------------------

(2)
$ svn log -r{2008-10-11}:{2008-10-11} -q
------------------------------------------------------------------------
r599 | wfan | 2008-10-10 13:37:04 -0400 (Fri, 10 Oct 2008)
------------------------------------------------------------------------

(3)
$ svn log -r{2008-10-10}:{2008-10-10} -q
------------------------------------------------------------------------
r596 | wfan | 2008-10-08 18:30:49 -0400 (Wed, 08 Oct 2008)
------------------------------------------------------------------------



So I'd NOT expect r596 to show in (1), since the commit date is NOT
between (2008-10-10 00:00:00) and (2008-10-11 00:00:00)

I'd not expect ANY results from (2), nor from (3), as I would think that
 the date ranges I've set up are impossible...

What am I missing in my understanding?

--
Wellington

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: svn log and date range

Posted by Andy Levy <an...@gmail.com>.
On Tue, Oct 14, 2008 at 15:12, Wellington Fan <wi...@gmail.com> wrote:
> Hello all,
>
> I thought that I understood the -r{DATE1}:{DATE2} syntax to grab all
> transactions from 00:00:00 of DATE1 to 00:00:00 of DATE2. I am using
> svn, version 1.5.1 (r32289).
>
> I issue the following commands and get unexpected results, numbered for
> easy reference:
>
> (1)
> $ svn log -r{2008-10-10}:{2008-10-11} -q
> ------------------------------------------------------------------------
> r596 | wfan | 2008-10-08 18:30:49 -0400 (Wed, 08 Oct 2008)
> ------------------------------------------------------------------------
> r597 | wfan | 2008-10-10 10:58:09 -0400 (Fri, 10 Oct 2008)
> ------------------------------------------------------------------------
> r599 | wfan | 2008-10-10 13:37:04 -0400 (Fri, 10 Oct 2008)
> ------------------------------------------------------------------------
>
> (2)
> $ svn log -r{2008-10-11}:{2008-10-11} -q
> ------------------------------------------------------------------------
> r599 | wfan | 2008-10-10 13:37:04 -0400 (Fri, 10 Oct 2008)
> ------------------------------------------------------------------------
>
> (3)
> $ svn log -r{2008-10-10}:{2008-10-10} -q
> ------------------------------------------------------------------------
> r596 | wfan | 2008-10-08 18:30:49 -0400 (Wed, 08 Oct 2008)
> ------------------------------------------------------------------------
>
>
>
> So I'd NOT expect r596 to show in (1), since the commit date is NOT
> between (2008-10-10 00:00:00) and (2008-10-11 00:00:00)

Yes it is. r599 is from 2008-10-10 13:37. That's between midnight of
October 10th and midnight of October 11th.

> I'd not expect ANY results from (2), nor from (3), as I would think that
>  the date ranges I've set up are impossible...
>

When you use a date for the revision range, the last log *before*
starting date you request is retrieved, because that was the state of
the repository *at* the beginning of the range.

http://svnbook.red-bean.com/en/1.5/svn.ref.svn.c.log.html

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: svn log and date range

Posted by Andy Levy <an...@gmail.com>.
On Tue, Oct 14, 2008 at 15:46, Wellington Fan <wi...@gmail.com> wrote:
> Hari Kodungallur wrote:
>
>>
>> Please read the box titled "Is Subversion a Day Early?", at this link:
>> http://svnbook.red-bean.com/en/1.5/svn.tour.revs.specifiers.html#svn.tour.revs.dates
>>
>
>
> I read that paragraph a few hundred times; now I think I finally
> understand. Thank you!
>
>
>
> (1)
> Correct me if I am wrong, but if I wanted to see all revisions that
> happened between date1 00:00:00 and date1 23:59:59 I could only:
>
> svn log -r{"date1 00:00:00"}:{"date1 23:59:59"}
>
>
> ...but would still have to throw out the first log entry, since that
> revision, which comes before "date1 00:00:00", would be "the most recent
> revision of the repository as of that date"...?

Yes, you will still have to "throw out" that first entry, if it's
prior to that timestamp. That's just how it's implemented.

> (2)
> One might be tempted to think that:
> svn log -r{"date1 23:59:59"}
>
> could yield the desired results, but would that only reveal the ONE
> revision before that datetime, and not all revisions fro that day?

I don't understand why one would be tempted to think that asking for a
log of a single point in time would return the log for a range of
times.  If you want a whole day, ask for the logs for a whole day, not
one point in time during that day.

What you're describing is that when you request the log for revision
4, you'd expect to get the logs for revisions 3 through 6. Subversion
gives you what you ask for.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: svn log and date range

Posted by Wellington Fan <wi...@gmail.com>.
Hari Kodungallur wrote:

> 
> Please read the box titled "Is Subversion a Day Early?", at this link:
> http://svnbook.red-bean.com/en/1.5/svn.tour.revs.specifiers.html#svn.tour.revs.dates
> 


I read that paragraph a few hundred times; now I think I finally
understand. Thank you!



(1)
Correct me if I am wrong, but if I wanted to see all revisions that
happened between date1 00:00:00 and date1 23:59:59 I could only:

svn log -r{"date1 00:00:00"}:{"date1 23:59:59"}


...but would still have to throw out the first log entry, since that
revision, which comes before "date1 00:00:00", would be "the most recent
revision of the repository as of that date"...?



(2)
One might be tempted to think that:
svn log -r{"date1 23:59:59"}

could yield the desired results, but would that only reveal the ONE
revision before that datetime, and not all revisions fro that day?


Thanks again!

--
Wellington

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: svn log and date range

Posted by Andy Levy <an...@gmail.com>.
On Tue, Oct 14, 2008 at 15:22, Hari Kodungallur <hk...@gmail.com> wrote:

> Please read the box titled "Is Subversion a Day Early?", at this link:
> http://svnbook.red-bean.com/en/1.5/svn.tour.revs.specifiers.html#svn.tour.revs.dates

That's the page in the book I was looking for!

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: svn log and date range

Posted by Hari Kodungallur <hk...@gmail.com>.
On Tue, Oct 14, 2008 at 12:12 PM, Wellington Fan <wi...@gmail.com>wrote:

> Hello all,
>
> I thought that I understood the -r{DATE1}:{DATE2} syntax to grab all
> transactions from 00:00:00 of DATE1 to 00:00:00 of DATE2. I am using
> svn, version 1.5.1 (r32289).
>
> I issue the following commands and get unexpected results, numbered for
> easy reference:
>
> (1)
> $ svn log -r{2008-10-10}:{2008-10-11} -q
> ------------------------------------------------------------------------
> r596 | wfan | 2008-10-08 18:30:49 -0400 (Wed, 08 Oct 2008)
> ------------------------------------------------------------------------
> r597 | wfan | 2008-10-10 10:58:09 -0400 (Fri, 10 Oct 2008)
> ------------------------------------------------------------------------
> r599 | wfan | 2008-10-10 13:37:04 -0400 (Fri, 10 Oct 2008)
> ------------------------------------------------------------------------
>
> (2)
> $ svn log -r{2008-10-11}:{2008-10-11} -q
> ------------------------------------------------------------------------
> r599 | wfan | 2008-10-10 13:37:04 -0400 (Fri, 10 Oct 2008)
> ------------------------------------------------------------------------
>
> (3)
> $ svn log -r{2008-10-10}:{2008-10-10} -q
> ------------------------------------------------------------------------
> r596 | wfan | 2008-10-08 18:30:49 -0400 (Wed, 08 Oct 2008)
> ------------------------------------------------------------------------
>
>
>
> So I'd NOT expect r596 to show in (1), since the commit date is NOT
> between (2008-10-10 00:00:00) and (2008-10-11 00:00:00)
>
> I'd not expect ANY results from (2), nor from (3), as I would think that
>  the date ranges I've set up are impossible...
>
> What am I missing in my understanding?



Please read the box titled "Is Subversion a Day Early?", at this link:
http://svnbook.red-bean.com/en/1.5/svn.tour.revs.specifiers.html#svn.tour.revs.dates

thanks,
-Hari