You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by sebb <se...@gmail.com> on 2014/12/03 13:22:02 UTC

Problems with selecting log revision by date: -r {yyyy-mm-dd}

I cannot get the examples in the manual to work.
They don't produce any output apart from the separator.

Is this a known bug?

How to reproduce:

svn co --depth files https://svn.apache.org/repos/asf/subversion/trunk
subversion

$ svn log -l 10 subversion
-- this works OK

$ svn log -r {2014-11-30} subversion
------------------------------------------------------------------------
$ svn log -r {2014-11-30T00:00:00} subversion
------------------------------------------------------------------------

This was tried on minotaur, using

svn, version 1.7.9 (r1462340)
   compiled Jun  3 2013, 11:33:48

I have the same problems with the following version

svn, version 1.8.10 (r1615264)
   compiled Aug 11 2014, 11:33:45 on x86_64-apple-darwin13.0.0

=================

There's also a minor documentation error, the manual says:

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 phrase "the next day" should be "the previous day" or "the day before"

Re: Problems with selecting log revision by date: -r {yyyy-mm-dd}

Posted by sebb <se...@gmail.com>.
On 3 December 2014 at 14:45, Johan Corveleyn <jc...@gmail.com> wrote:
> On Wed, Dec 3, 2014 at 2:45 PM, Philip Martin
> <ph...@wandisco.com> wrote:
>> Stefan Sperling <st...@elego.de> writes:
>>
>>> On Wed, Dec 03, 2014 at 12:22:02PM +0000, sebb wrote:
>>>>
>>>> svn co --depth files https://svn.apache.org/repos/asf/subversion/trunk
>>>> subversion
>>>>
>>>> $ svn log -l 10 subversion
>>>> -- this works OK
>>>>
>>>> $ svn log -r {2014-11-30} subversion
>>>> ------------------------------------------------------------------------
>>>> $ svn log -r {2014-11-30T00:00:00} subversion
>>>> ------------------------------------------------------------------------
>>>
>>> Date search doesn't work on the ASF repository because svn:date properties
>>> of revisions aren't monotonically increasing.
>>>
>>> See the note at the very bottom of http://svnbook.red-bean.com/en/1.7/svn.tour.revs.specifiers.html#svn.tour.revs.dates
>>>
>>
>> That's correct, but it is not the complete story.  The date search does
>> return a revision even if that revision is not "correct" is some sense.
>> However the date search works on the whole repository
>>
>>    https://svn.apache.org/repos/asf
>>
>> so the revision produced will often be one which didn't change
>> /subversion/trunk.  That means that an empty log is shown just like
>> it is for this
>>
>>    svn log -r1643098 https://svn.apache.org/repos/asf/subversion/trunk
>>
>> Even when a repository does have strictly mototonic dates using log with
>> a single date will often show a blank log on non-root paths within the
>> repository.
>>
>
> So perhaps the user should have specified a range, instead of just one date?
>
> Like:
>
>     $ svn log -r {2014-11-30}:HEAD subversion
>
> or:
>
>     $ svn log -r {2014-11-30}:{2014-11-31} subversion

Doh!

Thanks, that works.

> --
> Johan

Re: Problems with selecting log revision by date: -r {yyyy-mm-dd}

Posted by Johan Corveleyn <jc...@gmail.com>.
On Wed, Dec 3, 2014 at 2:45 PM, Philip Martin
<ph...@wandisco.com> wrote:
> Stefan Sperling <st...@elego.de> writes:
>
>> On Wed, Dec 03, 2014 at 12:22:02PM +0000, sebb wrote:
>>>
>>> svn co --depth files https://svn.apache.org/repos/asf/subversion/trunk
>>> subversion
>>>
>>> $ svn log -l 10 subversion
>>> -- this works OK
>>>
>>> $ svn log -r {2014-11-30} subversion
>>> ------------------------------------------------------------------------
>>> $ svn log -r {2014-11-30T00:00:00} subversion
>>> ------------------------------------------------------------------------
>>
>> Date search doesn't work on the ASF repository because svn:date properties
>> of revisions aren't monotonically increasing.
>>
>> See the note at the very bottom of http://svnbook.red-bean.com/en/1.7/svn.tour.revs.specifiers.html#svn.tour.revs.dates
>>
>
> That's correct, but it is not the complete story.  The date search does
> return a revision even if that revision is not "correct" is some sense.
> However the date search works on the whole repository
>
>    https://svn.apache.org/repos/asf
>
> so the revision produced will often be one which didn't change
> /subversion/trunk.  That means that an empty log is shown just like
> it is for this
>
>    svn log -r1643098 https://svn.apache.org/repos/asf/subversion/trunk
>
> Even when a repository does have strictly mototonic dates using log with
> a single date will often show a blank log on non-root paths within the
> repository.
>

So perhaps the user should have specified a range, instead of just one date?

Like:

    $ svn log -r {2014-11-30}:HEAD subversion

or:

    $ svn log -r {2014-11-30}:{2014-11-31} subversion

-- 
Johan

Re: Problems with selecting log revision by date: -r {yyyy-mm-dd}

Posted by Philip Martin <ph...@wandisco.com>.
Stefan Sperling <st...@elego.de> writes:

> On Wed, Dec 03, 2014 at 12:22:02PM +0000, sebb wrote:
>> 
>> svn co --depth files https://svn.apache.org/repos/asf/subversion/trunk
>> subversion
>> 
>> $ svn log -l 10 subversion
>> -- this works OK
>> 
>> $ svn log -r {2014-11-30} subversion
>> ------------------------------------------------------------------------
>> $ svn log -r {2014-11-30T00:00:00} subversion
>> ------------------------------------------------------------------------
>
> Date search doesn't work on the ASF repository because svn:date properties
> of revisions aren't monotonically increasing.
>
> See the note at the very bottom of http://svnbook.red-bean.com/en/1.7/svn.tour.revs.specifiers.html#svn.tour.revs.dates
>

That's correct, but it is not the complete story.  The date search does
return a revision even if that revision is not "correct" is some sense.
However the date search works on the whole repository

   https://svn.apache.org/repos/asf

so the revision produced will often be one which didn't change
/subversion/trunk.  That means that an empty log is shown just like
it is for this

   svn log -r1643098 https://svn.apache.org/repos/asf/subversion/trunk

Even when a repository does have strictly mototonic dates using log with
a single date will often show a blank log on non-root paths within the
repository.

-- 
Philip Martin | Subversion Committer
WANdisco // *Non-Stop Data*

Re: Problems with selecting log revision by date: -r {yyyy-mm-dd}

Posted by sebb <se...@gmail.com>.
On 3 December 2014 at 13:00, Stefan Sperling <st...@elego.de> wrote:
> On Wed, Dec 03, 2014 at 12:22:02PM +0000, sebb wrote:
>> I cannot get the examples in the manual to work.
>> They don't produce any output apart from the separator.
>>
>> Is this a known bug?
>>
>> How to reproduce:
>>
>> svn co --depth files https://svn.apache.org/repos/asf/subversion/trunk
>> subversion
>>
>> $ svn log -l 10 subversion
>> -- this works OK
>>
>> $ svn log -r {2014-11-30} subversion
>> ------------------------------------------------------------------------
>> $ svn log -r {2014-11-30T00:00:00} subversion
>> ------------------------------------------------------------------------
>>
>> This was tried on minotaur, using
>>
>> svn, version 1.7.9 (r1462340)
>>    compiled Jun  3 2013, 11:33:48
>>
>> I have the same problems with the following version
>>
>> svn, version 1.8.10 (r1615264)
>>    compiled Aug 11 2014, 11:33:45 on x86_64-apple-darwin13.0.0
>>
>> =================
>>
>> There's also a minor documentation error, the manual says:
>>
>> 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 phrase "the next day" should be "the previous day" or "the day before"
>
> Date search doesn't work on the ASF repository because svn:date properties
> of revisions aren't monotonically increasing.
>
> See the note at the very bottom of http://svnbook.red-bean.com/en/1.7/svn.tour.revs.specifiers.html#svn.tour.revs.dates

This says:

"... If this ordering isn't maintained, you will likely find that
trying to use dates to specify revision ranges in your repository
doesn't always return the data you might have expected."

Although this may be strictly true, it's not immediately obvious that
nothing might be returned.
It would be helpful if the docs made it a lot clearer that date
selection may not work at all.
This should be stated at the start of the section, rather than a note
at the bottom.
Is the ASF repo unusual in not having monotonic dates? Or is this a
common occurrence (as I suspect)?

Further, it would help if SVN returned some indication that dates
cannot be used on the particular repository.

Though ideally of course it would be nice if the feature worked across
all SVN installations.

Re: Problems with selecting log revision by date: -r {yyyy-mm-dd}

Posted by Stefan Sperling <st...@elego.de>.
On Wed, Dec 03, 2014 at 12:22:02PM +0000, sebb wrote:
> I cannot get the examples in the manual to work.
> They don't produce any output apart from the separator.
> 
> Is this a known bug?
> 
> How to reproduce:
> 
> svn co --depth files https://svn.apache.org/repos/asf/subversion/trunk
> subversion
> 
> $ svn log -l 10 subversion
> -- this works OK
> 
> $ svn log -r {2014-11-30} subversion
> ------------------------------------------------------------------------
> $ svn log -r {2014-11-30T00:00:00} subversion
> ------------------------------------------------------------------------
> 
> This was tried on minotaur, using
> 
> svn, version 1.7.9 (r1462340)
>    compiled Jun  3 2013, 11:33:48
> 
> I have the same problems with the following version
> 
> svn, version 1.8.10 (r1615264)
>    compiled Aug 11 2014, 11:33:45 on x86_64-apple-darwin13.0.0
> 
> =================
> 
> There's also a minor documentation error, the manual says:
> 
> 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 phrase "the next day" should be "the previous day" or "the day before"

Date search doesn't work on the ASF repository because svn:date properties
of revisions aren't monotonically increasing.

See the note at the very bottom of http://svnbook.red-bean.com/en/1.7/svn.tour.revs.specifiers.html#svn.tour.revs.dates