如果 .svn 文件夹已损坏,如何恢复 svn 控制? [英] How can I restore svn control if the .svn folder has been damaged?

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

问题描述

我有几个大的结帐,其中 .svn 文件夹已损坏,所以我收到错误消息,清理无法处理以下路径.."而且我无法再提交或更新该目录中的文件.

I've got a couple large checkouts where the .svn folder has become damaged so I'm getting and error, "Cleanup failed to process the following path.." And I can no longer commit or update files in that directory.

我只是删除并再次结帐,但整个目录都结束了.

I'd just delete and do the checkout again but the whole directory is over a gig.

是否有工具可以恢复特定文件夹的 .svn 文件夹,而无需下载所有内容?

Is there a tool that will restore the .svn folders for specific folders without having to download everything?

我知道它必须下载该文件夹中的所有文件,以便确定它们是否已更改..但是具有有效 .svn 文件夹的子目录应该没问题.

I understand that it's going to have to download all the files in that one folder so that it can determine if they've been changed..but subdirectories with valid .svn folders should be fine.

哦..我是 TortoiseSVN 或 Linux 命令行的忠实粉丝.

Oh.. I'm a big fan of TortoiseSVN or the command line for linux.

想法?

推荐答案

如果您对文件进行了更改并且无法删除它们,您可以使用 Subversion 1.5 功能,该功能允许您结帐时遇到障碍".

In case you have changes to the files, and cannot delete them, you can use the Subversion 1.5 feature that allows you to 'checkout with obstructions'.

删除该目录下的.svn目录即可:
(使用 --depth 文件时不需要删除内部目录,感谢 Eric)

Just delete the .svn directory in this directory and:
(you don't need to delete inside directories when using --depth files, thanks Eric)

如果损坏的目录是工作副本的顶层目录:

In case the broken directory was the top directory of the working copy:

svn checkout --depth files --force REPOS WC

如果损坏上面的目录仍然是版本化运行:

And if the directory above the broken one is still versioned run:

svn update --depth files --force WC

在那个目录中.
在两个示例中,REPOS 是存储库中与损坏目录匹配的 url,WC 是目录的路径.

in that directory.
In both samples REPOS is the url in the repository that matches the broken directory, and WC is the path to the directory.

原来修改过的文件在此之后将处于修改状态.

Files that were originally modified will be in the modified state after this.

这篇关于如果 .svn 文件夹已损坏,如何恢复 svn 控制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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