You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by William Yardley <sv...@veggiechinese.net> on 2009/09/17 22:45:35 UTC

unusual results with svn log

I build some nightly reports which use svn2cl as a wrapper around svn
log to send out changes. The script runs the equivalent of something
like the examples below, replacing the date with whatever is the current
date.

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"}
------------------------------------------------------------------------
r1 | someuser | 2009-09-15 08:28:15 -0700 (Tue, 15 Sep 2009) | 1 line

I'm not 

$ 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]

Currently running Subversion 1.4.6 (client & server); obviously
upgrading is the first thing I'd try, and I will do that as soon as we
have a window to upgrade our production SVN server, but curious if
anyone knows why this isn't behaving the way I'd expect it to.

w

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: unusual results with svn log

Posted by William Yardley <sv...@veggiechinese.net>.
FWIW, I also used an almost identical approach at a previous job, and
there things also worked the way I expected (when I specified the exact
date / time range on an entire repo).

w

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: unusual results with svn log

Posted by William Yardley <sv...@veggiechinese.net>.
On Mon, Sep 21, 2009 at 01:16:43PM -0500, Ryan Schmidt wrote:
> On Sep 21, 2009, at 12:40, William Yardley wrote:
> >On Fri, Sep 18, 2009 at 04:52:28AM -0500, Ryan Schmidt wrote:
> >>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?

> >> 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.
[...]
> >> 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

> > But that specifically says:

> > If you specify a single date as a revision *without specifying a
> > time of
> > day* [emphasis mine]..... 

> I realize the scenario in the book isn't exactly the same as yours,
> but I've always found Subversion to behave the way I described --
> always including all revisions between A and B, and one revision
> before A -- but I haven't sampled a whole lot of repositories.

> > [in a different repo, which, if it matters, is a subdirectory of the
> > repo itself]

> You can have repositories within directories on the server, but
> there's no such thing as a repository being a subdirectory of a
> repository.

Ok, let me put it differently. We have one repository which contains a
number of subdirectories which we use as separate repositories. From the
perspective of SVN, it's all one repo, though.

Re: unusual results with svn log

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Sep 21, 2009, at 12:40, William Yardley wrote:

> On Fri, Sep 18, 2009 at 04:52:28AM -0500, Ryan Schmidt wrote:
>> 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?
>
>> 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
>
> But that specifically says:
>
> If you specify a single date as a revision *without specifying a  
> time of
> day* [emphasis mine]..... 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}).
>
> So my reading is that if the exact time range is given, SVN should

I realize the scenario in the book isn't exactly the same as yours,  
but I've always found Subversion to behave the way I described --  
always including all revisions between A and B, and one revision  
before A -- but I haven't sampled a whole lot of repositories. Perhaps  
the behavior varies based on factors such as the repository backend,  
repository format version, and/or Subversion client or server version.


> Also, I haven't been seeing this behavior consistently with all  
> repos -
> using the same tools, *most* of our repos will only give me changes
> within that window, and will return nothing if there was nothing in
> that window.
>
> [in a different repo, which, if it matters, is a subdirectory of the
> repo itself]

You can have repositories within directories on the server, but  
there's no such thing as a repository being a subdirectory of a  
repository.


> $ svn log -v -r {"2009-09-20 00:00:00 -0700"}:{"2009-09-20
> 23:59:00 -0700"}
> ------------------------------------------------------------------------
>
> Yet within another repo:
> $ svn log -v -r {"2009-09-20 00:00:00 -0700"}:{"2009-09-20 23:59:00  
> -0700"}
> ------------------------------------------------------------------------
> r1 | username | 2009-09-15 08:28:15 -0700 (Tue, 15 Sep 2009) | 1 line
> [snip]

Note that the end of the day would be 23:59:59 not 23:59:00.


> Simply ignoring the first two lines isn't an option -- I'm calling svn
> log from within svn2cl, which is pulling it up in XML format, and
> having it display all the changed paths.

There isn't a way that I know of to make svn log output the  
information you requested directly; in my experience, you must post- 
process its results.

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: unusual results with svn log

Posted by William Yardley <sv...@veggiechinese.net>.
On Fri, Sep 18, 2009 at 04:52:28AM -0500, Ryan Schmidt wrote:
> 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?

> 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

But that specifically says:

 If you specify a single date as a revision *without specifying a time of
 day* [emphasis mine]..... 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}).

So my reading is that if the exact time range is given, SVN should 

Also, I haven't been seeing this behavior consistently with all repos -
using the same tools, *most* of our repos will only give me changes
within that window, and will return nothing if there was nothing in
that window.

[in a different repo, which, if it matters, is a subdirectory of the
repo itself]
$ svn log -v -r {"2009-09-20 00:00:00 -0700"}:{"2009-09-20
23:59:00 -0700"}
------------------------------------------------------------------------

Yet within another repo:
$ svn log -v -r {"2009-09-20 00:00:00 -0700"}:{"2009-09-20 23:59:00 -0700"}
------------------------------------------------------------------------
r1 | username | 2009-09-15 08:28:15 -0700 (Tue, 15 Sep 2009) | 1 line
[snip]

Simply ignoring the first two lines isn't an option -- I'm calling svn
log from within svn2cl, which is pulling it up in XML format, and
having it display all the changed paths.

w

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: unusual results with svn log

Posted by Ryan Schmidt <su...@ryandesign.com>.
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@subversion.tigris.org].