SVN 405 方法不允许

发布于 2024-09-16 21:53:49 字数 379 浏览 8 评论 0原文

我不小心删除了SVN中的一个文件夹并立即将其添加回来。我遇到了这个问题,我的解决方案最终从我的本地副本和服务器副本中完全删除了该文件夹。我可以对任何其他文件或文件夹进行更新和提交,没有任何问题,但如果我尝试创建具有相同名称的文件夹,添加并提交,则会出现以下错误:

svn:服务器发送了意外的返回值(不允许 405 方法)以响应 '/svn/www/!svn/wrk/9de0d765-2203-456c-af16-58e792ec7ac0/trunk/htdocs/solutions/medical 的 MKCOL 请求'

我有运行无数的清理、提交、更新等。没有任何方法可以解决问题。有想法吗?

仅供参考,我没有重命名顶级文件夹的选项。

I accidentally deleted a folder in SVN and added it back immediately. I ran into an issue with this and my solution ended up removing the folder completely from my local copy as well as the server copy. I can do updates and commits without problems on any other file or folder, but if I try to create a folder with the same name, add, and commit, it gives me the following error:

svn: Server sent unexpected return value (405 Method Not Allowed) in response to MKCOL request for '/svn/www/!svn/wrk/9de0d765-2203-456c-af16-58e792ec7ac0/trunk/htdocs/solutions/medical'

I have run countless cleanups, commits, updates, etc. Nothing resolves the issue. Ideas?

FYI, I do not have the option of renaming the top level folder.

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

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

发布评论

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

评论(11

海螺姑娘 2024-09-23 21:53:49

我的猜测是您尝试添加的文件夹已存在在 SVN 中。您可以通过将文件检出到不同的文件夹来确认,并查看 trunk 是否已经具有所需的文件夹。

My guess is that the folder you are trying to add already exists in SVN. You can confirm by checking out the files to a different folder and see if trunk already has the required folder.

揽清风入怀 2024-09-23 21:53:49

对我来说修复它的最快方法是复制受影响的文件夹,并使用备用名称提交它。然后svn mvplicatedFolderoriginalFolder。很容易。

因此,采取文件夹1并制作文件夹1复制:

svn delete folder1
svn add folder1Copy

提交并更新:

svn mv folder1Copy/ folder1/

再次提交,它就被修复了。

The quickest way for me to fix it was to duplicate the affected folder, and commit it with an alternative name. Then svn mv duplicateFolder originalFolder. Pretty easy.

So, take folder1 and make a folder1Copy:

svn delete folder1
svn add folder1Copy

Commit and update:

svn mv folder1Copy/ folder1/

Commit again and it's fixed.

鼻尖触碰 2024-09-23 21:53:49

我的“消失”文件夹是libraries/fof

如果我删除它,然后运行更新,它就不会显示。

cd libaries
svn up

(什么也没发生)。

但用实际名称更新:

svn update fof

成功了,它被更新了。因此,我将我的(手动 tar 归档的)工作副本分解并重新提交。最简单的解决方案。

My "disappeared" folder was libraries/fof.

If I deleted it, then ran an update, it wouldn't show up.

cd libaries
svn up

(nothing happens).

But updating with the actual name:

svn update fof

did the trick and it was updated. So I exploded my (manually tar-archived) working copy over it and recommitted. Easiest solution.

灼痛 2024-09-23 21:53:49

我刚刚在我自己的存储库中修复了这个问题。我在 Windows 上使用 TortoiseSVN,所以我不确定这在命令行上到底会翻译成什么命令,但这就是我所做的:

有问题的文件夹称为 lib,这是由于被添加。

  • 首先我取消了add,这样SVN就不再关注了
    它。
  • 然后我使用 Windows 上下文菜单将其重命名(命名为 libs,这并不重要),添加它并成功提交。
  • 最后,我使用 TortoiseSVN 的上下文菜单将其重命名回 lib(这可能很重要),并再次提交。

I just fixed this in my own repository. I'm using TortoiseSVN on Windows, so I'm not sure exactly what commands this translates to on the command line, but here's what I did:

The problematic folder is called lib, and it was due to be added.

  • First I undid the add, so that SVN was no longer paying attention to
    it.
  • Then I renamed it (to libs, not that that matters) using the Windows context menu, added it, and committed successfully.
  • Finally I renamed it back to lib using TortoiseSVN's context menu (this is probably important), and committed again.
梦里兽 2024-09-23 21:53:49

我刚才也遇到了这个问题,按照这样的方法解决了。所以我把它记录在这里,希望对其他人有用。

场景:

  1. 在我提交代码之前,修订版:100
  2. (其他人提交代码...修订版增加到199)
  3. 我(忘记运行“svn up”,)提交代码,现在我的修订版:200
  4. 我运行“svn up” ”。

发生错误。

解决方案:

  1. $ mv current_copy copy_back # 重命名当前代码副本
  2. $ svn checkout current_copy # 再次检查
  3. $ cp copy_back/ current_copy # 恢复修改

I also met this problem just now and solved it in this way. So I recorded it here, and I wish it be useful for others.

Scenario:

  1. Before I commit the code, revision: 100
  2. (Someone else commits the code... revision increased to 199)
  3. I (forgot to run "svn up", ) commit the code, now my revision: 200
  4. I run "svn up".

The error occurred.

Solution:

  1. $ mv current_copy copy_back # Rename the current code copy
  2. $ svn checkout current_copy # Check it out again
  3. $ cp copy_back/ current_copy # Restore your modifications
森林很绿却致人迷途 2024-09-23 21:53:49

我有类似的问题。我最终将它从轨道上炸毁,并在此过程中丢失了我的 SVN 历史记录。但至少我让那个该死的错误消失了。

这可能是要执行的次优命令序列,但它应该相当严格地遵循我为使事情正常工作而实际执行的命令序列:

cp -rp target ~/other/location/target-20111108
svn rm target --force
cp -rp ~/other/location/target-20111108 target-other-name
cd target-other-name
find . -name .svn -print | xargs rm -rf
cd ..
svn add target-other-name
svn ci -m "Re-re-re-re-re-re-re-re-re-re import target"
svn mv target-other-name target
svn ci -m "Re-re-re-re-re-re-re-re-re-re import target"

I had a similar problem. I ended up nuking it from orbit, and lost my SVN history in the process. But at least I made that damn error go away.

This is probably a sub-optimal sequence of commands to execute, but it should fairly closely follow the sequence of commands that I actually did to get things to work:

cp -rp target ~/other/location/target-20111108
svn rm target --force
cp -rp ~/other/location/target-20111108 target-other-name
cd target-other-name
find . -name .svn -print | xargs rm -rf
cd ..
svn add target-other-name
svn ci -m "Re-re-re-re-re-re-re-re-re-re import target"
svn mv target-other-name target
svn ci -m "Re-re-re-re-re-re-re-re-re-re import target"
卖梦商人 2024-09-23 21:53:49

如果您使用 code.google.com 托管 Subversion 存储库。

下面的事情你都知道吧?

If you plan to make changes, use this command to check out the code as yourself using HTTPS:

# Project members authenticate over HTTPS to allow committing changes.
svn checkout https://.../svn/trunk/ user-...

When prompted, enter your generated googlecode.com password.
Use this command to anonymously check out the latest project source code:

# Non-members may check out a read-only working copy anonymously over HTTP.
svn checkout http://.../svn/trunk/ ...-read-only

您确切提到的错误是您正在使用非成员可以通过 HTTP 匿名查看只读工作副本状态。因此,到目前为止你还不能承诺或做任何事情。

您必须使用项目成员通过 HTTPS 进行身份验证才能允许提交更改

现在就好了。

If you use code.google.com to host your Subversion repository.

You know below things, right?

If you plan to make changes, use this command to check out the code as yourself using HTTPS:

# Project members authenticate over HTTPS to allow committing changes.
svn checkout https://.../svn/trunk/ user-...

When prompted, enter your generated googlecode.com password.
Use this command to anonymously check out the latest project source code:

# Non-members may check out a read-only working copy anonymously over HTTP.
svn checkout http://.../svn/trunk/ ...-read-only

The error you mentioned exactly you are using Non-members may check out a read-only working copy anonymously over HTTP status. Therefore, you can not commit or do anything so far.

You must use Project members authenticate over HTTPS to allow committing changes thing.

It will be fine now.

儭儭莪哋寶赑 2024-09-23 21:53:49

我遇到了同样的问题,并能够通过以下方式修复它:

  1. 将文件夹复制到另一个位置。
  2. 从复制的文件夹中删除 .svn
  3. 右键单击​​原始文件夹并选择“SVN Checkout”
  4. 如果找不到(3),那么您的情况与我的情况不同。
  5. 查看 REPO-BROWSER 上的目录是否正确。就我而言,这就是原因。
  6. 查看
  7. 将文件从复制的文件夹恢复到原始目录。
  8. 犯罪。

I encountered the same issue and was able to fix it by:

  1. Copy the folder to another place.
  2. Delete .svn from copied folder
  3. Right click the original folder and select 'SVN Checkout'
  4. If you can't find (3), then your case is different than mine.
  5. See if the directory on the REPO-BROWSER is correct. For my case, this was the cause.
  6. Check out
  7. Get back the files from the copied folder into the original directory.
  8. Commit.
潇烟暮雨 2024-09-23 21:53:49

这意味着您尝试放在 svn 上的文件夹/文件已经存在。我的建议是,在执行任何操作之前,只需右键单击文件夹/文件,然后单击存储库浏览器。通过这样做,你将能够看到 svn 上已经存在的所有文件/子文件夹等。如果 svn 上不存在所需的文件/文件夹,那么您只需删除(备份后)要添加的文件,然后运行更新。

This means that the folder/file that you are trying to put on svn already exists there. My advice is that before doing anything just right click on the folder/file and click on repo-browser. By doing this you will be able to see all the files/sub-folders etc that are already present on svn. If the required file/folder is not present on the svn then you just delete(after taking backup) the file that you you want to add and then run an update.

也只是曾经 2024-09-23 21:53:49

当前添加的目录已在存储库中提交。因此删除存储库中的目录并再次提交同一目录。

The currently added directory is already committed in the repository. So delete the directory in the repository and commit the same directory again.

守望孤独 2024-09-23 21:53:49

我收到此错误是因为我将 URL 地址替换为以“/”结尾的新地址。我的意思是记录在 REPOSITORY 表的 .svn 文件夹中的 wc.db 数据库中。

当我删除符号:“/”时,错误就消失了。

I got this error because I replaced URL address with new one ending up with "/". I mean record in wc.db database in .svn folder in REPOSITORY table.

When I removed sign: "/" then the error went away.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文