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

Re: delete my trunk, how to recover?

From: François Beausoleil <francois.beausoleil_at_gmail.com>
Date: 2007-04-26 07:07:42 CEST

Hello Sam,

2007/4/26, Sam Carleton <scarleton@miltonstreet.com>:
> My subversion system is on a Linux box and I am developing on Windows
> using the TortoiseSVN. I just tried to do an update and somehow
> deleted my whole trunk! Hopefully I only lost 4 hours work, maybe
> weeks! How do I roll it back? I normally access the trunk via:
>
> https://apache/repos/project/trunk
>
> I don't care if I do it from Linux or Windows, just fast and secure!

When you say you deleted "trunk", do you mean your working copy or the
folder in your repository ?

If #1, simply checkout a new working copy and start from there.

If #2, you have to find the exact revision in which you deleted your
trunk (from Windows command line):

svn log --verbose --revision HEAD:1 --limit 5 https://apache/repos/project/

Notice the /trunk part is missing. That's because you want to log the
parent's folder, and not trunk itself (because it was deleted).

Once you have the revision (let's call it X), you will do:
svn copy --revision X-1 https://apache/repos/project/trunk
https://apache/repos/project/

Here, you tell Subversion to copy /trunk as it was in revision X-1 (do
the math, svn can't do it for you) and to put it back in /project.

Hope that helps !

-- 
François Beausoleil
http://blog.teksol.info/
http://piston.rubyforge.org/
Received on Thu Apr 26 07:08:01 2007

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.