Discussion:
svn log and revision date ranges
Davey, Sean
2008-05-09 12:54:12 UTC
Permalink
Hi, I thought I understood how the svn log command worked using date ranges, but now something occurred that leads me to believe I do not understand how it works. I did read the part in the book about subversion a day early. I am using a client version 1.4.5, the sever is 1.4.5 as well.

To demonstrate my dilemma:

I issue a command to a specific revision 37331

G:\>svn log http://bvsubver/svn/oss/WebRelease/trunk -r 37331 -v
------------------------------------------------------------------------
r37331 | ajax | 2008-05-08 13:32:49 -0400 (Thu, 08 May 2008) | 1 line
Changed paths:
M /WebRelease/trunk/web/src/ncss/web/order/orderinfo/fieldT1Definition.java

Restrict Hold orders to internal orders (no wholesale)
------------------------------------------------------------------------



the log returns what I expected for revision r37331

Using date range:
Note I am in Eastern Daylight time -4 hours UTC.

In order to capture that same log entry i issue the following svn log commands with date range:

G:\>svn log http://bvsubver/svn/oss/WebRelease/trunk -r "{2008-05-08 17:31:49 +0000}:{2008-05-08 19:01:05 +0000}"
------------------------------------------------------------------------

G:\>svn log http://bvsubver/svn/oss/WebRelease/trunk -r "{2008-05-08 17:32:49 +0000}:{2008-05-08 19:01:05 +0000}"
------------------------------------------------------------------------

G:\>svn log http://bvsubver/svn/oss/WebRelease/trunk -r "{2008-05-08 17:33:49 +0000}:{2008-05-08 19:01:05 +0000}"
------------------------------------------------------------------------

So each of the above commands getting issued, the start date in the range is changed to represent one minute b4 the commit 17:31:49, the actual commit date of 17:32:49, and one minute after the commit 17:33:49 and I cannot reveal the log entry with any of these comands.

I also changed the command to use Eastern Daylight changed the hour from 17 to 13 and changed +0000 to -0400

G:\>svn log http://bvsubver/svn/oss/WebRelease/trunk -r "{2008-05-08 13:31:49 -0400}:{2008-05-08 15:01:05 -0400}"
------------------------------------------------------------------------

G:\>svn log http://bvsubver/svn/oss/WebRelease/trunk -r "{2008-05-08 13:32:49 -0400}:{2008-05-08 15:01:05 -0400}"
------------------------------------------------------------------------

G:\>svn log http://bvsubver/svn/oss/WebRelease/trunk -r "{2008-05-08 13:33:49 -0400}:{2008-05-08 15:01:05 -0400}"
------------------------------------------------------------------------

Im at a loss as to why I cannot reveal r37331using date ranges. Any help would greatly be appreciated. Looking to use this command to trigger automatic builds when revisions have been detected with in a time frame.

Thank You
Sean
Keith Lawless
2008-05-10 11:33:23 UTC
Permalink
Post by Davey, Sean
Hi, I thought I understood how the svn log command worked using date
ranges, but now something occurred that leads me to believe I do not
understand how it works. I did read the part in the book about subversion a
day early. I am using a client version 1.4.5, the sever is 1.4.5 as well.
I also changed the command to use Eastern Daylight changed the hour from
17 to 13 and changed +0000 to -0400
G:\>svn log http://bvsubver/svn/oss/WebRelease/trunk -r "{2008-05-08
13:31:49 -0400}:{2008-05-08 15:01:05 -0400}"
------------------------------------------------------------------------
G:\>svn log http://bvsubver/svn/oss/WebRelease/trunk -r "{2008-05-08
13:32:49 -0400}:{2008-05-08 15:01:05 -0400}"
------------------------------------------------------------------------
G:\>svn log http://bvsubver/svn/oss/WebRelease/trunk -r "{2008-05-08
13:33:49 -0400}:{2008-05-08 15:01:05 -0400}"
------------------------------------------------------------------------
Try using the syntax: -r {"2008-05-08 13:31:49 -0499"}:{"2008-0508 15:01:05
-0400"}

I think the way you have it written, that whole string would be translated
as a single date.

Keith
Davey, Sean
2008-05-10 23:12:36 UTC
Permalink
Thanks for your reply Keith,

i tried several different syntax.


according to the caption in the svn book under "Is subversion a day early?"

"If you specify a single date as a revision without specifying a time of day (for example 2006-11-27), you may think that Subversion should give you the last revision that took place on the 27th of November. Instead, you'll get back a revision from the 26th, or even earlier. Remember that Subversion will find the most recent revision of the repository as of the date you give. If you give a date without a timestamp, like 2006-11-27, Subversion assumes a time of 00:00:00, so looking for the most recent revision won't return anything on the day of the 27th.

If you want to include the 27th in your search, you can either specify the 27th with the time ({"2006-11-27 23:59"}), or just specify the next day ({2006-11-28})."


the following is the comand and result of specificly asking for the revision 37331:
G:\>svn log http://bvsubver/svn/oss/WebRelease/trunk -r 37331
------------------------------------------------------------------------
r37331 | ajax | 2008-05-08 13:32:49 -0400 (Thu, 08 May 2008) | 1 line

Restrict Hold orders to internal orders (no wholesale)
------------------------------------------------------------------------


According "Is subversion a day early?" since the update im looking for occurred on 2008-05-08, if i specify the next day the 9th without a timestamp it should give me the log message(s). I dont get any messages with the following command:

G:\>svn log http://bvsubver/svn/oss/WebRelease/trunk -r "{2008-05-09}"
------------------------------------------------------------------------

G:\>svn log http://bvsubver/svn/oss/WebRelease/trunk -r {2008-05-09}
------------------------------------------------------------------------

G:\>svn log http://bvsubver/svn/oss/WebRelease/trunk -r {"2008-05-09"}
------------------------------------------------------------------------



Sean




-----Original Message-----
From: Keith Lawless [mailto:***@gmail.com]
Sent: Saturday, May 10, 2008 7:33 AM
To: Davey, Sean
Cc: ***@subversion.tigris.org
Subject: Re: svn log and revision date ranges


On Fri, May 9, 2008 at 8:54 AM, Davey, Sean < ***@broadviewnet.com> wrote:



Hi, I thought I understood how the svn log command worked using date ranges, but now something occurred that leads me to believe I do not understand how it works. I did read the part in the book about subversion a day early. I am using a client version 1.4.5, the sever is 1.4.5 as well.

I also changed the command to use Eastern Daylight changed the hour from 17 to 13 and changed +0000 to -0400

G:\>svn log http://bvsubver/svn/oss/WebRelease/trunk -r "{2008-05-08 13:31:49 -0400}:{2008-05-08 15:01:05 -0400}"
------------------------------------------------------------------------

G:\>svn log http://bvsubver/svn/oss/WebRelease/trunk -r "{2008-05-08 13:32:49 -0400}:{2008-05-08 15:01:05 -0400}"
------------------------------------------------------------------------

G:\>svn log http://bvsubver/svn/oss/WebRelease/trunk -r "{2008-05-08 13:33:49 -0400}:{2008-05-08 15:01:05 -0400}"
------------------------------------------------------------------------

Try using the syntax: -r {"2008-05-08 13:31:49 -0499"}:{"2008-0508 15:01:05 -0400"}

I think the way you have it written, that whole string would be translated as a single date.

Keith
Keith Lawless
2008-05-12 22:47:05 UTC
Permalink
Post by Davey, Sean
According "Is subversion a day early?" since the update im looking for
occurred on 2008-05-08, if i specify the next day the 9th without a
timestamp it should give me the log message(s). I dont get any messages
G:\>svn log http://bvsubver/svn/oss/WebRelease/trunk -r "{2008-05-09}"
------------------------------------------------------------------------
G:\>svn log http://bvsubver/svn/oss/WebRelease/trunk -r {2008-05-09}
------------------------------------------------------------------------
G:\>svn log http://bvsubver/svn/oss/WebRelease/trunk -r {"2008-05-09"}
------------------------------------------------------------------------
Hi Sean,

Take a look at page 33 of the Subversion book for an explanation of what's
going on. I think if you
changed your URL to http://bvsubver/svn/ or something similar you would see
the results you expect.

The -r {date} format will resolve to the latest revision of your
*repository* that took place
before that date. However, if that revision only touched files elsewhere in
your repository,
and you provide a path, then you will get the "blank" log message.

Here's an example:

C:\>svn log http://svn.collab.net/repos/svn -r HEAD -v
------------------------------------------------------------------------
r31144 | epg | 2008-05-12 18:25:16 -0400 (Mon, 12 May 2008) | 2 lines
Changed paths:
M /branches/1.5.x/STATUS

Vote for r31131.

------------------------------------------------------------------------

The most recent revision in the public svn repository was made in the
/branches/ directory.

C:\>svn log http://svn.collab.net/repos/svn/trunk -r HEAD -v
------------------------------------------------------------------------

So, doing an svn log against trunk, asking for the HEAD revision, returns
nothing.

C:\>svn log http://svn.collab.net/repos/svn/trunk --limit 1 -v
------------------------------------------------------------------------
r31143 | dlr | 2008-05-12 16:24:33 -0400 (Mon, 12 May 2008) | 1 line
Changed paths:
M /trunk/subversion/libsvn_ra_serf/serf.c

* subversion/libsvn_ra_serf/serf.c (svn_ra_serf__get_dir): Fix formatting.
------------------------------------------------------------------------

However, limit can be used to return *something* from this directory. I
admit this doesn't
solve your problem, but hopefully will help you grok what is going on.

Keith

Loading...