简体   繁体   English

Tortoise SVN更新不会还原已删除的工作副本

[英]Tortoise SVN update doesn't restore a deleted working copy

Accidentally I deleted a working copy folder in my local repo. 我不小心删除了本地存储库中的工作副本文件夹。 Is there a way to get it back ? 有办法找回它吗? SVN update is not helping me. SVN更新无济于事。 When I Update it shows success. 当我更新时,它显示成功。 But no files/folders will be created. 但是不会创建任何文件/文件夹。 I did not do a SVN delete. 我没有删除SVN。 I deleted the folder from file system. 我从文件系统中删除了该文件夹。 Can anyone please help ? 谁能帮忙吗?

I got the problem and solution. 我得到了问题和解决方案。 Seems like SVN maintains a file in which it has remembered status of each working copy. 似乎SVN维护着一个文件,在该文件中它已记住每个工作副本的状态。 Now when you delete any version'ed file, SVN doesn't know of this. 现在,当您删除任何版本的文件时,SVN对此一无所知。 Hence when you try update, it does nothing. 因此,当您尝试更新时,它什么都不做。

Solution: Solution is to right click on the parent folder and try to update it to any revision which is not latest. 解决方案:解决方法是右键单击父文件夹,然后尝试将其更新为最新版本。 When you do this, the folder goes into conflict state as it does not find the files. 当您执行此操作时,该文件夹将进入冲突状态,因为它找不到文件。 Once in conflict, resolve the conflict and do an update to revision which you need. 发生冲突后,请解决冲突并更新所需的修订版。

If you had local changes in the folder, they're lost unless you recover them from the recycle bin, of course. 如果您在文件夹中进行了本地更改,那么除非您从回收站中将其恢复,否则它们将丢失。 If your working copy was under a parent directory that's also under version control (A Projects or Source Code directory, for example), you can simply do a revert on that directory to get your local copy back, without local modifications. 如果您的工作副本位于同样受版本控制的父目录下(例如, Source Code Projects或“ Source Code目录),则只需对该目录进行还原即可恢复本地副本,而无需进行本地修改。

If your directory was the top-most local directory, that is: its parent directory is not under version control, you'll have to do a fresh checkout of the directory to get it back. 如果您的目录是最顶层的本地目录,即:其父目录不受版本控制,则必须对目录进行全新签出才能将其取回。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM