SVN 405 方法不允许
我不小心删除了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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(11)
我的猜测是您尝试添加的文件夹已存在在 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.
对我来说修复它的最快方法是复制受影响的文件夹,并使用备用名称提交它。然后
svn mvplicatedFolderoriginalFolder
。很容易。因此,采取文件夹1并制作文件夹1复制:
提交并更新:
再次提交,它就被修复了。
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:
Commit and update:
Commit again and it's fixed.
我的“消失”文件夹是
libraries/fof
。如果我删除它,然后运行更新,它就不会显示。
(什么也没发生)。
但用实际名称更新:
成功了,它被更新了。因此,我将我的(手动 tar 归档的)工作副本分解并重新提交。最简单的解决方案。
My "disappeared" folder was
libraries/fof
.If I deleted it, then ran an update, it wouldn't show up.
(nothing happens).
But updating with the actual name:
did the trick and it was updated. So I exploded my (manually tar-archived) working copy over it and recommitted. Easiest solution.
我刚刚在我自己的存储库中修复了这个问题。我在 Windows 上使用 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.it.
libs
, not that that matters) using the Windows context menu, added it, and committed successfully.lib
using TortoiseSVN's context menu (this is probably important), and committed again.我刚才也遇到了这个问题,按照这样的方法解决了。所以我把它记录在这里,希望对其他人有用。
场景:
发生错误。
解决方案:
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:
The error occurred.
Solution:
我有类似的问题。我最终将它从轨道上炸毁,并在此过程中丢失了我的 SVN 历史记录。但至少我让那个该死的错误消失了。
这可能是要执行的次优命令序列,但它应该相当严格地遵循我为使事情正常工作而实际执行的命令序列:
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:
如果您使用
code.google.com
托管 Subversion 存储库。下面的事情你都知道吧?
您确切提到的错误是您正在使用
非成员可以通过 HTTP 匿名查看只读工作副本
状态。因此,到目前为止你还不能承诺或做任何事情。您必须使用
项目成员通过 HTTPS 进行身份验证才能允许提交更改
。现在就好了。
If you use
code.google.com
to host your Subversion repository.You know below things, right?
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.
我遇到了同样的问题,并能够通过以下方式修复它:
I encountered the same issue and was able to fix it by:
这意味着您尝试放在 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.
当前添加的目录已在存储库中提交。因此删除存储库中的目录并再次提交同一目录。
The currently added directory is already committed in the repository. So delete the directory in the repository and commit the same directory again.
我收到此错误是因为我将 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.