简体   繁体   English

svn:外部失败的目录错误无法获取非目录'目录'的锁定

[英]svn: external failed directory error Can't obtain lock on non-directory 'directory'

I have just loaded some old files and directories of an old project onto my PC from SVN to debug an issue. 我刚从SVN将一些旧项目的旧文件和目录加载到我的PC上以调试问题。

I am getting the following when trying to update the working directory: 我在尝试更新工作目录时收到以下信息:

external failed directory error Can't obtain lock on non-directory 'directory'

I have tried svn cleanup as suggested by some posts but to no avail. 我已经按照一些帖子的建议尝试了svn cleanup ,但无济于事。

Anyone got any pointers as to how I might resolve this? 任何人都有任何关于如何解决这个问题的指示?

It appears if I rename the existing directory and then get the code to a new directory the problem is solved. 如果我重命名现有目录然后将代码提供给新目录,问题就解决了。

Now I understand what those other posts meant. 现在我明白其他帖子的意思了。

I cannot really tell what exactly was the problem, but for me the following workaround worked: Remove (or rename if you changed files) the folder in question. 我无法确切地知道究竟是什么问题,但对我来说,以下解决方法有效:删除(或重命名,如果您更改了文件)有问题的文件夹。 Update -> The Folder will be recreated. 更新 - >将重新创建文件夹。

If necessary copy the files that you changed before. 如有必要,请复制之前更改的文件。

I had the same error. 我有同样的错误。 The problem was that the directory containing the resources already existed in the path in which it was pointing, it has to be deleted and the svn automatically creates it. 问题是包含资源的目录已经存在于它所指向的路径中,必须将其删除,并且svn会自动创建它。

Not works: 不起作用:

Existing directories on destiny path: 命运路径上的现有目录:

version\\ 版\\

  • ext1 EXT1
  • ext2 EXT2

Path that will receive the external: 将接收外部的路径:

version\\\\ext1 版本\\\\ EXT1

Source path of the external: 外部的源路径:

^/project1/resource/ext1 ^ / PROJECT1 /资源/ EXT1

It works: 有用:

Existing directories on destiny path: 命运路径上的现有目录:

version\\ 版\\

  • ext2 EXT2

Path that will receive the external: 将接收外部的路径:

version\\\\ext1 版本\\\\ EXT1

Source path of the external: 外部的源路径:

^/project1/resource/ext1 ^ / PROJECT1 /资源/ EXT1

This happens when in a directory external the .svn directory is deleted. 在删除.svn目录外部的目录中时会发生这种情况。 This can happen for example when a script secretly deletes the local directory and replaces it by an exact copy without the ".svn" directory. 例如,当脚本秘密删除本地目录并将其替换为没有“.svn”目录的精确副本时,就会发生这种情况。

So if you delete this look-alike/doppelganger and restore the original from repo evertyhing is OK. 因此,如果你删除这个相似/ / doppelganger并从repo evertyhing恢复原来是可以的。

If you are known to ClearCase this effect is called an "eclipse". 如果你知道ClearCase,这种效果称为“日食”。

我在执行SVN更新之前没有创建外部引用的目录,从而解决了错误。

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

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