windows SVN 说我需要执行清理,但清理失败

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/344714/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 11:42:43  来源:igfitidea点击:

SVN says I need to perform cleanup, but the cleanup fails

windowssvnwindows-vistatortoisesvn

提问by Dirk Vollmar

!!! This is not a duplicate question since the solutions offered in the other topics didn't work for me.

!!!这不是一个重复的问题,因为其他主题中提供的解决方案对我不起作用。

When I try to commit:

当我尝试提交时:

Error: Working copy 'D:\Webs\Drupal 6' locked
Error: Please execute the "Cleanup" command.

错误:工作副本 'D:\Webs\Drupal 6' 已锁定
错误:请执行“清理”命令。

When I try to do a cleanup:

当我尝试进行清理时:

Cleanup failed to process the following paths: D:\Webs\Drupal 6

清理无法处理以下路径:D:\Webs\Drupal 6

Does anyone know how I can solve this problem?

有谁知道我该如何解决这个问题?

回答by Dirk Vollmar

Does it work if you do

如果你这样做,它会起作用吗

  • a new "clean" checkout
  • merge the files that you have modified into the new checkout folder(s) using a merge / diff tool
  • commit
  • 一个新的“干净”结帐
  • 使用合并/差异工具将您修改的文件合​​并到新的检出文件夹中
  • 犯罪

?

?

EDIT: Updated point 2 according to derobert comment.

编辑:根据 derobert 评论更新第 2 点。

回答by derobert

If you haven't modified D:\Webs\Drupal 6, then the easiest thing might just be to nuke it, then let svn co grab it from the server again.

如果您还没有修改过D:\Webs\Drupal 6,那么最简单的方法可能就是对其进行核攻击,然后让 svn co 再次从服务器上抓取它。

Or, if you have modified files, you can try divo's suggestion, but beware of accidentally reverting other people's changes.

或者,如果你有修改过的文件,你可以试试divo的建议,但要注意不小心回滚了别人的修改。

Or, you could look inside the .svndirectories and try to clean the locks out by hand.

或者,您可以查看.svn目录内部并尝试手动清除锁定。

EDIT:Here is how the nuke/copy procedure can revert other people's changes:

编辑:这是核弹/复制程序如何恢复其他人的更改:

  1. Checkout, get r1;
  2. Modify foo.c, giving r1 + changes;
  3. Someone else checks in a change to foo.c (you don't know they've done this, of course, and the normal way of checking is broken for you), foo.c in the repo is now r2;
  4. You now nuke your repository except foo.c (r1 + changes);
  5. You do a checkout, get foo.c r2.
  6. You replace foo.c with your copy (r1 + changes). Subversion, however, is unaware of this, and thinks you based your changes on r2, not r1.
  7. Checkin, foo.c is now r3, which has just lost the other person's changes in r2.
  1. 结帐,得到r1;
  2. 修改foo.c,给r1+修改;
  3. 其他人检查了对 foo.c 的更改(当然,您不知道他们已经这样做了,而且正常的检查方式对您来说已被破坏),repo 中的 foo.c 现在是 r2;
  4. 您现在核对您的存储库,除了 foo.c(r1 + 更改);
  5. 你结帐,得到 foo.c r2。
  6. 您将 foo.c 替换为您的副本(r1 + 更改)。然而,Subversion 不知道这一点,并认为您的更改基于 r2,而不是 r1。
  7. checkin,foo.c现在是r3,刚刚丢掉对方在r2的改动。

Hope that clarifies how that procedure can accidentally revert other people's changes. It can be avoided, but only if you're aware of how it can happen!

希望澄清该程序如何意外恢复其他人的更改。它是可以避免的,但前提是您知道它是如何发生的!

回答by Ben

I just went through and deleted all the relevant .svn folders, and then ran a cleanup. works perfectly!

我刚刚删除了所有相关的 .svn 文件夹,然后进行了清理。完美运行!

回答by Jerry Miller

/*

/*

I ran into a similar problem. The suggestion to use svn cleanup was useless, because cleanup gave the same error (a recursive one, in this case). Eventually, I realized that I had imported a workspace checked out from a remote repo into my local one, so I replaced the checkout with an export, deleted the repo path, recreated it, and checked it in. After one failed checkout, caused by the ambiguity of path levels on both the sending and receiving end (!), I was able to checkout with no problems. This suggests to me that maybe the old .svn components were part of the import and were confusing subversion, and it didn't know enough to ignore them. Every time I try to create a repository, it's a relearning experience.

我遇到了类似的问题。使用 svn cleanup 的建议没有用,因为 cleanup 给出了相同的错误(在这种情况下是递归错误)。最终,我意识到我已经将一个从远程 repo 签出的工作区导入到我的本地,所以我用导出替换了 checkout,删除了 repo 路径,重新创建了它,然后签入了。 在一次签出失败后,由于发送端和接收端的路径级别的模糊性(!),我能够毫无问题地结帐。这向我表明,旧的 .svn 组件可能是导入的一部分并且是令人困惑的颠覆,它不知道忽略它们。每次我尝试创建存储库时,都是一种重新学习的体验。

*/

*/

Never mind. I made the following mistakes: 1) edited the export command, not the checkout one; 2) omitted the full path from the destination and ended up in a cygwin subdirectory hidden from Windows!

没关系。我犯了以下错误:1)编辑了导出命令,而不是结帐命令;2) 省略了目标的完整路径,最终出现在 Windows 隐藏的 cygwin 子目录中!