On 6/24/07, Ryan Schmidt <subversion-2007b@ryandesign.com> wrote:
>
> <..snip..>
>
> Hari, I stand by my original reply. It is expected that r61 is
> included in the output, though at first it does not seem like it
> should be. I do not believe Subversion works the way you have described.
>
> True, when you request
>
> -r {2007-06-21}:{2007-06-22}
>
> what you actually get is
>
> -r {"2007-06-21 00:00:00"}:{"2007-06-22 00:00:00"}
>
> But Subversion does not give you all revisions that occur between
> those dates/times, though at first that's what you might think you'd
> get.
>
> Instead, Subversion converts each date/time to a revision, by finding
> the newest revision at or before that time.
>
> Going back to Karl's original situation, r61 was committed at
> 2007-06-19 16:26:34 and r62 at 2007-06-21 17:11:46, so the
> {"2007-06-21 00:00:00"} part of the revision argument is converted to
> 61, because r61 is the newest revision committed at or before the
> specified time. Similarly, the {"2007-06-22 00:00:00"} part is
> converted to 65, because, though we don't see it, r66 was presumably
> committed after 2007-06-22 00:00:00.
>
> Perhaps the little box in the book should be expanded to explain this
> better, but I'm pretty sure that's the way it works.
>
First of all, I am sorry, I did not mean to say you are wrong. Only wanted
to point out that there is some inconsistency with what you expect svn log
to do (from the documentation) and what it actually does. In fact, I am
trying it now, and it gets more interesting. The last revision *before* the
given date/time is not consistent either. At least it is not what I
expected.
[~] > svn log -q -r{"2007-06-21"}:{"2007-06-21"} $SVNROOT
------------------------------------------------------------------------
r80919 | author | 2007-06-20 23:42:16 -0700 (Wed, 20 Jun 2007)
------------------------------------------------------------------------
[~] >
This is as explained by you, Ryan.
[FYI: r80919 is a change to file under $SVNROOT/branches -- this info will
be useful below]
[~] > svn log -q -r{"2007-06-21"}:{"2007-06-21"} $SVNROOT/trunk
------------------------------------------------------------------------
[~] >
I would've expected that that I will see at least one revision even for
$SVNROOT/trunk. But not so. [I actually did a longer range and from 21st
till HEAD and it did start from a revision after 21st 00:00:00].
[~] > svn log -q -r{"2007-06-21"}:{"2007-06-21"} $SVNROOT/branches
------------------------------------------------------------------------
r80919 | author | 2007-06-20 23:42:16 -0700 (Wed, 20 Jun 2007)
------------------------------------------------------------------------
[~] >
So, now it seems clear that the last revision before the given date/time
applies only if that revision affected files within the given path. If not,
it will not go as far as to look at the last revision that affected this
path.
Anyway, good to know these details.
Thanks!
-Hari Kodungallur
Received on Mon Jun 25 06:12:25 2007