Accidentally deleted main trunk in repository

889 views
Skip to first unread message

Robert Lewis

unread,
Aug 18, 2010, 1:57:39 AM8/18/10
to us...@tortoisesvn.tigris.org
I had created a branch and wanted to delete it. So I clicked on it, rt
clicked and said delete. But my main development stream was deleted,
trunk. Is there anyway to get it with the history back? I have the
latest working directory but can't see anyway to undo shooting myself
in the head.

/trunk ; this has been deleted
/branches
/tags

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2648084

To unsubscribe from this discussion, e-mail: [users-un...@tortoisesvn.tigris.org].

Jean-Marc van Leerdam

unread,
Aug 18, 2010, 2:08:43 AM8/18/10
to us...@tortoisesvn.tigris.org
Hi,

On 18 August 2010 07:57, Robert Lewis <robertle...@gmail.com> wrote:
> I had created a branch and wanted to delete it. So I clicked on it, rt
> clicked and said delete. But my main development stream was deleted,
> trunk. Is there anyway to get it with the history back? I have the
> latest working directory but can't see anyway to undo shooting myself
> in the head.
>

If you have not committed: just do a revert on the workign copy.

If you have committed: Start the repository browser, change to the
revision prior to the committed delete and your trunk should be
visible again. You should be able to pull that version into your
working copy & commit again. (sorry for not being able to provide an
exact recipe at the moment, I do not have TSVN available on my current
environment).

The TSVN manual probably provides some pointers too on how to undo
changes from a specific revision.

Good luck.

--
Regards,

Jean-Marc
--
.       ___
.  @@  // \\      "De Chelonian Mobile"
. (_,\/ \_/ \     TortoiseSVN
.   \ \_/_\_/>    The coolest Interface to (Sub)Version Control
.   /_/   \_\     http://tortoisesvn.net

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2648096

Robert Lewis

unread,
Aug 18, 2010, 2:30:23 AM8/18/10
to us...@tortoisesvn.tigris.org
Thank you for your reply, Jean-marc.

I have not committed but I still cannot revert to the version before the delete. 75 was the delete, 74 was the folder addition, 73 is the last good working revision.

I can however checkout version 73 which was the last good version. I can see the history up to 75 under the top level repo folder, but I can't get back the main development folder which was lost after version 74. If I could delete version 74, and 75 I think it would work. But there is no delete option in the repo browser, nor in the log messages. I have tried the revert under the working directory without success. I can go directly to the repo and put in 73 as the Head and see the folder /trunk but there is no way to delete 74 or 75.

Robert

Hi,

Good luck.

--
Regards,

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2648096

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2648108

Daniel Becroft

unread,
Aug 18, 2010, 2:40:03 AM8/18/10
to us...@tortoisesvn.tigris.org
On Wed, Aug 18, 2010 at 4:30 PM, Robert Lewis <robert...@imnmicrocontrol.com> wrote:
Thank you for your reply, Jean-marc.

I have not committed but I still cannot revert to the version before the delete. 75 was the delete, 74 was the folder addition, 73 is the last good working revision.

I can however checkout version 73 which was the last good version. I can see the history up to 75 under the top level repo folder, but I can't get back the main development folder which was lost after version 74. If I could delete version 74, and 75 I think it would work. But there is no delete option in the repo browser, nor in the log messages. I have tried the revert under the working directory without success. I can go directly to the repo and put in 73 as the Head and see the folder /trunk but there is no way to delete 74 or 75.

Robert

If you can see an entry in the Log for the deletion of /trunk, then you have committed the delete.

To restore /trunk:
1) Open the repository browser to the last good revision (r73) in your case.
2) Right-click on /trunk in the tree-view, and select "Copy to ...".
3) In the New name field, change the name (and then back again) to enable the OK button.
4) Click OK. Enter a log message, and Click OK.

/trunk will now be available in HEAD, with history.

Cheers,
Daniel B.
 

Wolf Peuker

unread,
Aug 18, 2010, 3:33:48 AM8/18/10
to us...@tortoisesvn.tigris.org
Hi Robert,
I'm not sure if I fully understand Daniel's suggestion, maybe its only a
short cut to the merge procedure I describe below.

Am 18.08.2010 08:40, schrieb Daniel Becroft:
>
> If you can see an entry in the Log for the deletion of /trunk, then you have
> committed the delete.
>
> To restore /trunk:
> 1) Open the repository browser to the last good revision (r73) in your case.
> 2) Right-click on /trunk in the tree-view, and select "Copy to ...".
> 3) In the New name field, change the name (and then back again) to enable
> the OK button.
> 4) Click OK. Enter a log message, and Click OK.
>
> /trunk will now be available in HEAD, with history.
>
> Cheers,
> Daniel B.

From my point of view you have to merge
all changes between r73 and r75 in reverse order.

* right-click the mouse on the root folder of your working copy
* select "TortoiseSVN > Merge..." and the Merge dialog opens
* check [*] Merge range of revisions, [Next >]
* Edit "URL to merge from" should contain trunk
(change or select by browsing)
* "Revision range to merge" enter here 74-75 (yes! r74 and r75)
or select the last two changes by browsing, click [Show log]
* check [*] Reverse merge, [Next >]
* (do a [Test merge] if you want)
* [Merge]

Now you have a working identically to the r73 revision ready for commit.
Do the commit entering a good log message and you're done. (now at r76)

Best Regards,
Wolf

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2648132

Robert Lewis

unread,
Aug 18, 2010, 5:40:15 PM8/18/10
to us...@tortoisesvn.tigris.org
Hi Wolf

Thank you for the steps but I have tried but it will not work. I get an
error saying that

Error File not found: revision 75, path '/trunk'

I get this when I try to use just one version or the two, 74,75.

Robert

-----Original Message-----
From: Wolf Peuker [mailto:p...@rekoba.de]
Sent: Wednesday, August 18, 2010 12:34 AM
To: us...@tortoisesvn.tigris.org
Subject: Re: Accidentally deleted main trunk in repository

Best Regards,
Wolf

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2
648132

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2648439

Robert Lewis

unread,
Aug 18, 2010, 6:21:16 PM8/18/10
to us...@tortoisesvn.tigris.org

Hi Daniel

 

I have tried your suggestion and was able to revert the last version after the deletion but before the version I want. I can see 73 and 75 but no 74 now. But I cannot revert the version that contains the deletion which is 75.

 

I get an error

 

File not found: revision 74, path ‘/trunk’

 

I get the same error if I try to make a new copy, revert, switch versions, merge.

 

I can’t even add in a new folder. For some reason, TortoiseSVN deleted the folder trunk when I was under a different folder and now won’t allow me to go back to before the deletion.

 

What would be the best plan now? Export to a flat directory and create a new repository and start over?

 

I can’t see a way to get out of this endless loop.

 

Thanks for all the suggestions

 

Robert

Konstantin Kolinko

unread,
Aug 18, 2010, 6:36:22 PM8/18/10
to us...@tortoisesvn.tigris.org
2010/8/19 Robert Lewis <robert...@imnmicrocontrol.com>:

> Hi Daniel
>
> I have tried your suggestion and was able to revert the last version after
> the deletion but before the version I want. I can see 73 and 75 but no 74
> now. But I cannot revert the version that contains the deletion which is 75.
>

Please read
"Resurrecting Deleted Items" in the svn-book
http://svnbook.red-bean.com/nightly/en/svn.branchmerge.basicmerging.html#svn.branchmerge.basicmerging.resurrect

That is the theory behind all of it.


Either merge your changes from rev.74, or do a copy from r74, not r73
as you did.

Best regards,
Konstantin Kolinko

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2648476

Robert Lewis

unread,
Aug 18, 2010, 8:24:25 PM8/18/10
to us...@tortoisesvn.tigris.org
Hi

I read the article thank you; I understand the principles... my problem is
that I cannot get any of the principles to work. I don't have SVN installed,
other than the TortoiseSVN implementation

I have followed the advice of each of the posts and none of them work.
//
I can't revert, the path is missing... which seems to me an error in the
revert function or missing functionality.

I can't copy from the last good copy which is 73 to a new version which
would be 76 because the path is missing

I can't reverse merge because the path is missing

I can check out the last good version and work with that version but

I can't commit the changes because before I can commit I have to update the
checked out copy first, but

I can't update the checked out version because there is a 'tree conflict'
since the path \trunk is missing

So this looks to me like a catch 22 situation

Is this a design error? If it is a procedure error, then what I would like
to do is find a working procedure to reverse the error but so far there
doesn't seem to be one. If it is a design error then I would like to know so
I can give up and build a new repository and start over again and not waste
any more time trying to regain what is irrevocably lost.

Cheers

Robert

-----Original Message-----
From: Konstantin Kolinko [mailto:knst.k...@gmail.com]
Sent: Wednesday, August 18, 2010 3:36 PM
To: us...@tortoisesvn.tigris.org
Subject: Re: Accidentally deleted main trunk in repository

Best regards,
Konstantin Kolinko

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2
648476

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2648483

Wolf Peuker

unread,
Aug 19, 2010, 4:33:02 AM8/19/10
to us...@tortoisesvn.tigris.org
Hi Robert,

after reading all of this thread it seems to me that something with the
repository you are connected to or with the svn installation must be
corrupt. I've no further idea.

Maybe it was good to have some information about the server side,
operating system, svn version number etc.
(though I'm not the expert who is able to check it against the problem)

Best,
Wolf

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2648665

Konstantin Kolinko

unread,
Aug 19, 2010, 5:22:45 AM8/19/10
to us...@tortoisesvn.tigris.org
2010/8/19 Robert Lewis <robert...@imnmicrocontrol.com>:
> Hi
>
> I read the article thank you; I understand the principles... my problem is
> that I cannot get any of the principles to work. I don't have SVN installed,
> other than the TortoiseSVN implementation
>

Also read the "peg revisions" page linked there.

http://svnbook.red-bean.com/nightly/en/svn.advanced.pegrevs.html

The usual way to set peg revision in TortoiseSVN is to set explicit
revision in the Repository Browser.

Best regards,
Konstantin Kolinko

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2648689

Reply all
Reply to author
Forward
0 new messages