[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: Bo Berglund <bo.berglund_at_gmail.com>
Date: Sat, 19 May 2018 00:01:45 +0200

On Fri, 18 May 2018 15:36:02 -0500, Dane Kantner
<dane.kantner_at_gmail.com> wrote:

> svn log -v -r {2012-05-06}:{2017-01-01} <URL to server side directory> is
>not reliable though as it doesn't actually consistently return the data
>correctly ; there has been a past topic on this and it's been explained as
>a known defect due to how it was implemented. You're better off trying to
>determine the revision number in play at the time of the start, and at the
>time of the end, then using the revision numbers instead.

Thanks, I used this in a WC:
svn log -v -r {2012-10-01}:HEAD URL
And it returned the few commits including affected files that were
involved from the start date. Not so many given that the project is so
old. But it clearly showed the bogus commits I want to recover from.

So now I know what has happened and I found the revision numbers for
two revisions that were committed erroneously last December when I was
preparing for the CVS -> SVN migration.
These revisions are 4309 and 4310

Now my problem is in finding the correct svn command to restore the
trunk files to the state they were in prior to commit r4309.

I have googled a lot tonight and read the svnbook too but I am none
the wiser (not so that I dare run a command and risk screwing up the
repository).
I have some candidates within the top dir of a WC of the
project/trunk:

svn merge -c 4308:HEAD .

svn merge -r 4308:HEAD .

svn merge -r 4309:HEAD .

svn merge -c COMMITTED:PREV .

Questions:
----------
1) Use -c or -r?

2) Which order of revision numbers?

3) What to do to restore to two revisions back?

-- 
Bo Berglund
Developer in Sweden
Received on 2018-05-19 00:02:03 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.