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

Re: How to check out a project based on commit time rather than rev?

From: Ryan Schmidt <subversion-2018_at_ryandesign.com>
Date: Fri, 18 May 2018 18:55:19 -0500

On May 18, 2018, at 14:14, Nathan Hartman wrote:
> On Fri, May 18, 2018 at 12:35 PM Bo Berglund wrote:
>> On Fri, 18 May 2018 18:00:21 +0200, Bo Berglund wrote:
>>
>>> Obviously this is a "for dummies" question but I *have* looked at the
>>> svnbook but I cannot still find how to do this:
>>
>> I did not read good enough!
>> This worked fine to get the information I needed concerning active
>> revision numbers:
>> svn log -v -r {2012-05-06}:{2017-01-01} <URL to server side directory>
>> > log.txt
>>
>> So now I can use this to compare the files and add what is lacking to
>> the wc I have checked out to make it be current at the date I need.
>
> I've wondered why there isn't a checkout or update command that takes a date and time but usually I look in the log to figure out what is the revision number.

There is no need for a separate command because any command that takes a revision number can also accept a date and time. If no time is specified, the time is midnight. Subversion then uses the newest revision that precedes the given date and time. For example, if I request to check out MacPorts code from midnight October 10, 2002:

$ cd /tmp
$ svn co https://svn.macports.org/repository/macports/trunk -r '{2002-10-10}'
$ cd trunk
$ svn info
Path: .
Working Copy Root Path: /private/tmp/trunk
URL: https://svn.macports.org/repository/macports/trunk
Relative URL: ^/trunk
Repository Root: https://svn.macports.org/repository/macports
Repository UUID: d073be05-634f-4543-b044-5fe20cf6d1d6
Revision: 1025
Node Kind: directory
Schedule: normal
Last Changed Author: jpm
Last Changed Rev: 1025
Last Changed Date: 2002-10-09 22:38:38 -0500 (Wed, 09 Oct 2002)

I get revision 1025, the newest revision that is not after midnight October 10, 2002.
Received on 2018-05-19 01:55: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.