如何修复“包含工作副本管理区域丢失”的问题在SVN中?

发布于 2024-08-03 17:51:41 字数 219 浏览 11 评论 0原文

我手动删除了刚刚在存储库中离线添加的目录。我无法恢复目录。

任何进行更新或提交的尝试都将失败,并显示:

"blabla/.svn" containing working copy admin area is missing.

我明白原因,但无论如何都可以解决此问题。

我不想签出整个存储库并手动添加我的更改,这需要几个小时。

I deleted manually a directory I just added, offline, in my repository. I can't restore the directory.

Any attempt to do an update or a commit will fail with:

"blabla/.svn" containing working copy admin area is missing.

I understand why, but is there anyway to fix this.

I don't want to checkout the entire repo and add my changes to it manually, it would take hours.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(21

遗心遗梦遗幸福 2024-08-10 17:51:41

根据此: http://www.devcha.com /2008/03/svn-directory-svn-containing-working.html

将文件夹“blabla”检出到其他位置,然后将其 .svn 文件夹复制回原始“blabla”。

According to this: http://www.devcha.com/2008/03/svn-directory-svn-containing-working.html

Check-out the folder "blabla" to a different location and then copy its .svn folder back into the original "blabla".

情徒 2024-08-10 17:51:41

fwiw,我有类似的情况并使用svn --force delete __dir__。这为我解决了这个问题。然后我继续像往常一样处理我的工作副本。

fwiw, I had a similar situation and used svn --force delete __dir__. That solved the issue for me. Then i continued working with my working copy as normal.

三寸金莲 2024-08-10 17:51:41

我解决此问题的方法是删除相关文件夹的本地副本,然后直接对父级进行svn update

马上修好了。

What I did to fix this was to delete the local copy of the folder under question and then do an svn update of the parent directly afterwards.

Fixed it right up.

奈何桥上唱咆哮 2024-08-10 17:51:41

您可以尝试查看父目录的新副本吗?

编辑:更具体地说,我的意思是建议上一级并删除包含的目录。然后执行

svn update --set-depth infinity

替换目录。

Can you try to check out a new copy of the parent directory?

Edit: To be bit more specific, I meant to suggest going up one level and deleting the containing directory. Then do a

svn update --set-depth infinity

to replace the directory.

猫腻 2024-08-10 17:51:41

我向 svn 添加了一个目录,然后我不小心删除了其中的 .svn 文件夹。

我曾经

svn delete --keep-local folderName

解决过我的问题。

I added a directory to svn, then I accidentally deleted the .svn folder within.

I used

svn delete --keep-local folderName

to fix my problem.

始终不够 2024-08-10 17:51:41

我刚刚做了“svn revert /blabla”并且它起作用了,文件夹回来了,我可以 svn 删除它

I just did 'svn revert /blabla' and it worked, the folder is back and I can svn delete it

∝单色的世界 2024-08-10 17:51:41

当我尝试将目录添加到存储库但没有足够的文件系统权限来执行此操作时,出现错误“包含工作副本管理区域的目录‘blah/.svn’丢失”。该目录尚未在存储库中,但在添加失败后声称处于版本控制之下。

将父目录的副本签出到另一个位置,并替换工作副本的父目录中的 .svn 文件夹使我能够成功添加并提交新目录(当然,在修复文件权限之后)。

The error "Directory 'blah/.svn' containing working copy admin area is missing" occurred when I attempted to add the directory to the repository, but did not have enough filesystem privileges to do so. The directory was not already in the repository, but it was claiming to be under version control after the failed add.

Checking out a copy of the parent directory to another location, and replacing the .svn folder in the parent dir of the working copy allowed me to add and commit the new directory successfully (after fixing the file permissions, of course).

土豪 2024-08-10 17:51:41

我们使用maven和svn。导致此错误的原因是错误地将目标目录签入到 SVN。如果这个提示对任何人有帮助的话,删除它就可以解决所有问题。

We use maven and svn. It was an mistaken checkin of target directory to SVN that cause this error. Removing that fixed everything, if this hint helps anyone.

挽你眉间 2024-08-10 17:51:41

我尝试了 svn rm --force /path/to/dir 却无济于事,但最终只是运行了 svn up 并为我修复了它。

I tried svn rm --force /path/to/dir to no avail but ended up just running svn up and it fixed it for me.

茶底世界 2024-08-10 17:51:41

最近,当我的 SVN 全局设置中排除了文件时,我遇到了此错误。这个错误特别严重,因为我还直接从存储库中删除了文件 - 这意味着上述解决方案拒绝不起作用。在这种情况下,从我从 SVN 中删除的目录中手动删除 .svn 目录允许我运行更新,然后允许我提交。

I had this error recently, when the files were excluded by settings in my SVN globals. The error was especially nasty since I also deleted the files directly from the repository - and this meant that the above solutions were refusing wouldn't work. In this case, manually deleting the .svn directory from the directory that I removed from SVN allowed me to run an update which then allowed me to commit.

当梦初醒 2024-08-10 17:51:41

当我尝试切换“C:\superfolder”时,我遇到了同样的问题

错误消息:

目录 'C:\superfolder\subfolder\.svn'
含有
工作副本管理区域丢失
请执行“清理”命令。

尝试进行“清理”后,我收到以下错误:

 清理无法处理以下路径:
 C:\超级文件夹\
“C:\superfolder\subfolder\”不是工作副本目录

解决方案:

  1. 删除文件夹“子文件夹”
  2. 清理文件夹“超级文件夹”
  3. 尝试再次切换

对我有用的文件夹“超级文件夹”。
请告诉我它是否也适合您。

I had the same problem, when I was trying to switch "C:\superfolder"

Error messages:

Directory 'C:\superfolder\subfolder\.svn'
containing
working copy admin area is missing
Please execute the 'Cleanup' command.

After trying to do a "cleanup", I got the following error:

 Cleanup failed to process the following paths:
 C:\superfolder\
'C:\superfolder\subfolder\' is not a working copy directory

Solution:

  1. Delete the folder "subfolder"
  2. Clean up the folder "superfolder"
  3. Try to switch again the folder "superfolder"

this worked for me.
Please let me know if it also works for you.

羁绊已千年 2024-08-10 17:51:41

我最近遇到了这个错误。这是由于 root 拥有目录中的几个文件而导致出现此错误。

在我更改权限后,一切都按预期进行。

I had this error recently. It was caused by root owning a couple of files in the directory giving this error.

After I changed the permissions everything worked as expected.

箜明 2024-08-10 17:51:41

从你的帖子里没看懂太多。
我的解决方案是

  1. 剪切有问题的文件夹并复制到某个位置。
  2. 将“从 Subversion 获取解决方案”复制到另一个工作目录(只是新的目录)。
  3. 将保存的文件夹添加到新的工作副本并将其添加为现有项目(如果它是我的情况下的项目)。
  4. 犯罪;

Didn't understand much from your posts.
My solution is

  1. Cut the problematic folder and copy to some location.
  2. Do Get Solution From Subversion into another working directory (just new one).
  3. Add your saved folder to the new working copy and add it As Existing Project (if it's project as in my case).
  4. Commit;
平安喜乐 2024-08-10 17:51:41

我有这个问题。只需暂时将 blabla 移动到另一个位置,告诉 svn 恢复它,然后再将其移回来。它被视为新添加。简单的!

I had this issue. Just move blabla to another location temporarily, tell svn to revert it, and then move it back. It is treated as a new addition. Simple!

寂寞清仓 2024-08-10 17:51:41

对我有帮助的最简单的方法:

rm -rf _dir_in_question_
svn up

如果您对有问题的目录进行了更改,那么这对您来说不是一个好的解决方案。

The simplest that helped me:

rm -rf _dir_in_question_
svn up

If you have changes in the problematic dir, then this is not a good solution for you.

马蹄踏│碎落叶 2024-08-10 17:51:41

我在用新版本替换第三方 API 库时遇到了这个问题,这里的解决方案都没有真正适合我,因为我想用本地版本替换 SVN 版本。我的解决方案如下:

1)将有问题的文件夹移至我的主目录,从 SVN 中将其删除并提交:

mv foldercausingproblem ~/
svn --force delete foldercausingproblem
svn commit --message "Temporary removing folder with old API"

2)将文件夹放回去,将其添加到 SVN 并再次提交:

mv ~/foldercausingproblem ./
svn --force add .
svn commit --message "Finally all working!"

必须提交两次有点令人恼火,但似乎工作得很好。

I came across this problem when replacing a third party API library with a newer version, and none of the solutions here really worked for me because I wanted to replace the SVN version with the local version. My solution was as follows:

1) Move the offending folder to my home dir, delete it from SVN and commit:

mv foldercausingproblem ~/
svn --force delete foldercausingproblem
svn commit --message "Temporary removing folder with old API"

2) Put the folder back, add it to SVN and commit again:

mv ~/foldercausingproblem ./
svn --force add .
svn commit --message "Finally all working!"

Slightly irritating to have to commit twice, but it seems to have worked fine.

dawn曙光 2024-08-10 17:51:41

以防万一有人想要另一个解决方案:

  1. 将新文件夹签入“foldername2”
  2. 进入 Tortise SVN 存储库浏览器
  3. 将“foldername2”重命名为“foldername”
  4. 在 Windows 资源管理器中进行更新

希望它可以帮助某人。

-Ev

Just in case anyone wants yet another solution:

  1. Check in your new folder as "foldername2"
  2. Go into Tortise SVN repo browser
  3. Rename "foldername2" to "foldername"
  4. In windows explorer do an update

Hope it helps someone.

-Ev

圈圈圆圆圈圈 2024-08-10 17:51:41

时,也发生了同样的问题

  • 对我来说,当我删除(--force)一个.map文件
  • 通过svn propedit svn将*.map添加到svn:ignore :ignore .

我的解决方案是:

  1. 撤消对属性的更改
  2. 提交对文件的更改
  3. 签出存储库的新副本(唉!)
  4. 更改属性并提交

For me, the same issue happened when I both:

  • deleted (--force) a .map file
  • added *.map to svn:ignore via svn propedit svn:ignore .

My solution was to:

  1. undo changes to the property
  2. commit changes to the files
  3. checkout a fresh copy of the repository (alas!)
  4. change the property and commit
猥︴琐丶欲为 2024-08-10 17:51:41

当我尝试向 svn 添加目录时遇到这个问题。我通过进入回购浏览器解决了这个问题。右键单击左侧窗口,选择“添加文件夹”,然后直接在存储库浏览器中添加目录。

然后我在本地删除了该目录(当然是在备份之后)进行了清理和 svn 更新,一切都恢复正常了。

I had this problem when I was trying to add a directory to svn. I solved it by going into repo browser. Right clicking in the left window, choosing add folder and adding the directory directly in the repo browser.

I then deleted the directory locally (after backup of course) did a clean up and svn update and everything was working again.

卖梦商人 2024-08-10 17:51:41

首先,将项目检出到系统的文件夹中。然后从冲突项目中删除 .svn 文件夹,并从新的签出文件夹中复制 .svn 文件夹并粘贴到工作副本文件夹中。那么问题就解决了。

First of all checkout the project into your system in a folder. Then remove the .svn folder from conflict project and copy the .svn folder from new checkout folder and paste into your working copy folder. Then problem is solved.

赏烟花じ飞满天 2024-08-10 17:51:41

我经历的一项常见任务是必须在暂存中获取一个存储库目录并将其复制到另一个存储库 - 两者都在 SVN 下且名称相同。对我有用的方法如下:

svn --force delete PROBLEMATIC-DIR
svn export "https://OLD REPO-A/ new-repo-A"
svn add new-repo-A
svn commit new-repo-A

A common task I experienced was having to take one repo directory in staging and copy it to another repo - both under SVN and both called the same name. The way that worked for me was the following:

svn --force delete PROBLEMATIC-DIR
svn export "https://OLD REPO-A/ new-repo-A"
svn add new-repo-A
svn commit new-repo-A
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文