如何恢复本地删除的文件夹? [英] how to restore a locally deleted folder?

查看:71
本文介绍了如何恢复本地删除的文件夹?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在本地删除文件,然后 svn update 会恢复该文件的本地副本.但是,这似乎不适用于文件夹.有没有办法让它也适用于文件夹?

Locally deleting a file followed by svn update restores the local copy of that file. However this does not seem to apply to folders. Is there any way to make it work for folders as well?

这是控制台输出的样子:

This is what the console output looks like:

C:\svn\Google Project Hosting\xulwin\xulrunnersamples>rmdir /S /Q treeview

C:\svn\Google Project Hosting\xulwin\xulrunnersamples>svn up
D    treeview
Updated to revision 50.

我已经使用 svn 两年多了,以前从来没有出现过这个错误.但我没有更改任何设置.我唯一能想到的是我今天在我的外部硬盘上用 Tortoise SVN 创建了一个本地存储库来备份一些不相关的旧东西.但这不应该是问题的原因,因为该行为同时发生在来自这个本地存储库的本地副本和我来自 Google Project Hosting 的代码中.

I have used svn for over two years now and I never had this error before. But I didn't change any settings. The only thing I can think of was that I created a Local Repository with Tortoise SVN today on my external hard drive to back up some unrelated old stuff. But that should not be the cause of the problem because the behavior occurs both on the local copy from this local repository and my code from Google Project Hosting.

WTF 我突然不能再重现这个错误了.现在一切正常.但我没有改变任何东西.

WTF I suddenly can't reproduce the bug anymore. It all works as it should now. But I didn't change anything.

在 EDIT1 中,该文件似乎被标记为已删除,但并非如此,因为 svn commit 命令什么也没做.Tortoise Check for modified 也没有列出任何内容.

In EDIT1 the file seems to be marked as deleted, but it isn't since the svn commit command did nothing. Neither did Tortoise Check for modifications list anything.

注意:当问题仍然出现时,完全递归更新确实恢复了文件夹.

Note: When the problem still occurred, a fully recursive update did restore the folder.

推荐答案

我今天在使用 svn 1.5.6 时遇到了这个问题.svn up --force the_dir_path 为我修复了它.

I ran into this problem today with svn 1.5.6. svn up --force the_dir_path fixed it for me.

重新创建:

$ svn up
Updated to revision X.
$ rm -rf the_dir_path
$ svn up
D the_dir_path
Updated to revision X.
$ svn up
Updated to revision X.
$ svn up --force the_dir_path
A ....
A ....
Updated to revision X.

这篇关于如何恢复本地删除的文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆