[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: checkout by date gives wrong version of repo

From: Christian Bird <cabird_at_gmail.com>
Date: Wed, 1 Oct 2008 23:24:39 -0700

Thanks a bunch for the info. I've got it working now by parsing the
log and finding the latest revision prior to the specified date.

-- Chris

On Wed, Oct 1, 2008 at 9:33 PM, Ryan Schmidt
<subversion-2008c_at_ryandesign.com> wrote:
>
> On Oct 1, 2008, at 4:45 PM, Christian Bird wrote:
>
>> On Wed, Oct 1, 2008 at 1:04 PM, Ryan Schmidt wrote:
>>
>>> On Oct 1, 2008, at 1:03 PM, Christian Bird wrote:
>>>
>>>> I'm trying to study the evolution of ant and I'm doing checkouts of
>>>> ant's svn repo in three month increments. I have been checking out
>>>> with:
>>>>
>>>> svn co --revision {2008-7-1}
>>>> http://svn.apache.org/repos/asf/ant/core/trunk/ foobar
>>>>
>>>> For appropriate dates. This seems to work until I get before
>>>> 2006-1-1. If I give it any date prior to that, I get the repo as of
>>>> that date. I know by browsing their repo online, that changes were
>>>> being made prior to that.
>>>> Also, I can browse the online ant repo and find the revision closest
>>>> to a date I want and check it out by revision number and things work
>>>> correctly. So if I do
>>>>
>>>> svn co --revision 320000 http://svn.apache.org/repos/asf/ant/core/trunk/
>>>> foobar2
>>>>
>>>> Then it checks out correctly the repository for the revision 320000 at
>>>> the date that is indicated by browsing the online repo. I could try
>>>> to find a way to find the actual revision number associated with each
>>>> date, but I'd really like to specify a date for checkout and have it
>>>> work correctly. Has anyone seen anything like this before? I'd
>>>> really appreciate any tips/hints/etc.
>>>>
>>>> I'm using svn 1.5.2 in case that helps. Thanks!
>>>
>>> It seems to be working for me, also with Subversion 1.5.2, on Mac OS X
>>> 10.4.11:
>>>
>>>
>>> $ svn log -q -r {2006-6-1} http://svn.apache.org/repos/asf
>>> ------------------------------------------------------------------------
>>> r410747 | crossley | 2006-05-31 23:56:36 -0500 (Wed, 31 May 2006)
>>> ------------------------------------------------------------------------
>>> $ svn log -q -r {2006-5-1} http://svn.apache.org/repos/asf
>>> ------------------------------------------------------------------------
>>> r398522 | jsisson | 2006-04-30 23:32:48 -0500 (Sun, 30 Apr 2006)
>>> ------------------------------------------------------------------------
>>> $ svn log -q -r {2006-4-1} http://svn.apache.org/repos/asf
>>> ------------------------------------------------------------------------
>>> r390592 | crossley | 2006-03-31 23:58:40 -0600 (Fri, 31 Mar 2006)
>>> ------------------------------------------------------------------------
>>> $ svn log -q -r {2006-3-1} http://svn.apache.org/repos/asf
>>> ------------------------------------------------------------------------
>>> r381913 | rahul | 2006-02-28 23:32:26 -0600 (Tue, 28 Feb 2006)
>>> ------------------------------------------------------------------------
>>> $ svn log -q -r {2006-2-1} http://svn.apache.org/repos/asf
>>> ------------------------------------------------------------------------
>>> r374002 | richter | 2006-01-31 23:51:36 -0600 (Tue, 31 Jan 2006)
>>> ------------------------------------------------------------------------
>>> $ svn log -q -r {2006-1-1} http://svn.apache.org/repos/asf
>>> ------------------------------------------------------------------------
>>> r365270 | arminw | 2005-12-31 13:07:20 -0600 (Sat, 31 Dec 2005)
>>> ------------------------------------------------------------------------
>>> $
>>>
>>>
>>> The only reason I know of for the date revision syntax to give incorrect
>>> results is if the revisions of the repository are not all in
>>> chronological
>>> order. This could happen, for example, if one were to "svnadmin load"
>>> another repository into the repository. I do not know if this is the case
>>> for the ASF repository.
>>
>> I'm sorry, I was testing for logs prior to 2006-1-1. Try 2005-10-1
>> for example. If it indeed works for you, then that's good news
>> because it means that the problem is on my end. Thanks!
>
> It seems to work for me at the moment for that particular test:
>
> $ svn log -q -r {2005-10-1} http://svn.apache.org/repos/asf
> ------------------------------------------------------------------------
> r365014 | tomdz | 2005-09-30 16:48:46 -0500 (Fri, 30 Sep 2005)
> $
>
> However, the binary search that Subversion performs probably depends on how
> many revisions are in the repository at the moment you do the query. As
> revisions are constantly being added, the specific searches that will fail
> will vary. You should not expect a date revision search to be reliable in
> the ASF repository, because their revisions are not all in chronological
> order, per:
>
> http://apache.org/dev/version-control.html#date-revisions
>
>

-- 
Christian Bird
cabird_at_gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-10-03 00:43:41 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.