I just ran into (at least one variation of) this phenomena and believe I know
what's going on.
When a date range is used, the first thing that svn does is decide which
revision to start the log from. It does this by taking a snapshot of the
HEAD revision AT THE START TIME specified. Not the first revision AFTER the
start time, but the HEAD revision AT the start time.
So, as an example. If I give the command:
svn log URL -r {2011-04-25T11:00:00}:{2011-04-26T11:00:00}
then the first thing that svn does is take the head revision at 11:00 on
April 25th. The head revision at this time will obviously be the last commit
BEFORE this point. From there, svn determines the last revision within the
time frame and displays the logs. Unfortunately, that first commit will be
before the specified start point.
I tested this by issuing an svn log command from the root of my repository
with matching start and end times:
svn log URL -r {2011-04-25T11:00:00}:{2011-04-25T11:00:00}
and then saw that a single log statement was returned - the commit made last
before this point in time. I should have received no such log statement.
One last important point. The behavior above can SEEM to be sporadic.
Sometimes an out-of-range revision is displayed, and sometimes it isn't. The
reason for this is that if you run the log command in a branch, we'll call
it BranchA, but the head revision that svn determines the start point from
is in another branch, BranchB, it will be filtered out of the log results.
Because the out-of-range head revision is in another branch and gets
filtered out of the results, the user never sees it and thinks that they
luckily got a correct output.
Why this issue hasn't been resolved yet (I am running version 1.6.13
(r1002816)) is for a different thread.
Hope this helps
-hb
Eric White-11 wrote:
>
> Good day all,
> I am working on an application that uses information from an svn log
> between
> two dates. After searching around I have found the following is supposed
> to
> work (according to the SVN book)
>
> svn log --revision {2002-11-20}:{2002-11-29} URL
>
> I have tried this and although it does indeed give me results between
> the two dates, it also gives me many values outside that range.
>
> Try for example svn log --revision {2008-11-02}:{2008-11-04}
> http://svn.apache.org/repos/asf
> and you can grep 2008-01
>
> You will find a handful of lines that contain 2008-01-* which is quite
> clearly outside the range given. I am looking for values between
> November 2nd 2008 and November 4th 2008.
>
> You can even grep 2007 and you will find many entries that aren't even
> in the same year that I have specified.
>
> This is a problem. Now I can go ahead and double check the dates
> against the desired range. I can very easily exclude the January dates
> when the range is for November. But how do I know that I am actually
> getting all the results and not just a subgroup?
>
> Any insight would be appreciated!
>
> Cheers
> Eric
>
>
--
View this message in context: http://old.nabble.com/svn-log-get-revisions-by-date-tp20543137p31483092.html
Sent from the Subversion Users mailing list archive at Nabble.com.
Received on 2011-04-27 02:06:09 CEST