如果 .svn 文件夹已损坏,如何恢复 svn 控制?

编程入门 行业动态 更新时间:2024-10-19 03:33:59
本文介绍了如果 .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 控制?

本文发布于:2023-06-06 01:40:38,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/531186.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文件夹   svn

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!