svn: 项目<文件夹>已经过时了

发布于 2024-08-31 20:17:32 字数 424 浏览 3 评论 0原文

[赏金系统违背我的意愿自动选择的答案]

我正在使用 subclipse,并且总是在删除 Eclipse 中的文件夹并尝试提交它时,出现以下错误:

svn: Item <folder> is out of date
svn: DELETE of <folder>: 409 Conflict (http://myintranet)

通过命令行删除和提交工作正常,但出了什么问题通过 subclipse 来做吗?还有人遇到这个问题吗?

(我在 Ubuntu 9.10 和 10.04;上一个 Eclipse 版本;以及 subclipse 1.4 中遇到了这个问题 - 因为 subclipse 的下一个版本有更多错误)

--更新: 当我删除文件夹而不是文件时

[answer auto-selected by bounty system against my will]

I'm using subclipse, and always when delete a folder in Eclipse, and try to commit it, the following errors raise:

svn: Item <folder> is out of date
svn: DELETE of <folder>: 409 Conflict (http://myintranet)

Deleting and commiting via command line works fine, but what's wrong with doing it via subclipse? Is anyone more experiencing this problem?

(I experienced this problem in Ubuntu 9.10 and 10.04; last Eclipse version; and subclipse 1.4 - as the next versions of subclipse have much more bugs)

--updated: Its when I delete folders, not files

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

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

发布评论

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

评论(7

So尛奶瓶 2024-09-07 20:17:33

我想如果你在那之前更新它应该有效..它确实对我有用

i think if you UPDATE before that it should work.. it did work for me

安静 2024-09-07 20:17:33

有一个简单的解决方案,无需安装一些额外的软件。我也遇到了这个“问题”,您可以执行以下操作:

  1. 打开 SVN 存储库视图
  2. ,转到您想要删除的文件夹并将其删除,
  3. 返回到 java 视图,
  4. 更新您实际删除的项目中的文件夹/ 更新您的项目也应该有效

这解决了我的问题,因为更新仅检索了我删除的文件。

There's a simple solution without installing some extra software. I also had this "problem" and what you can do is the following:

  1. open the SVN Repository view
  2. there go to the folder you want to get rid of and delete it
  3. go back to the java view
  4. update the folder in your project you actually deleted / update your project should also work

That solved the problem in my case, as updating only retrieved the files I deleted.

苹果你个爱泡泡 2024-09-07 20:17:33

Subclipse有很多这样的问题。 90% 的情况下它都能工作,然后就无法正常工作了!我正在使用 subclipse,因为它很好地集成到 eclipse 中,当我遇到问题或在 svn 中需要一些更大的动作(例如合并某些分支)时,我使用 Tortoisse。

我有像你这样的目录。然后我就像 @luiscolorado 建议的那样运行 TortoiseSVN,它很有帮助。 Tortoise 是一个很棒的工具(它有很多很棒的功能,可以用于比较、应用补丁、获取补丁等)。

今天,当我删除一个文件,而有人更改了同一个文件时,我遇到了问题!然后 subclipse 显示冲突(到目前为止一切正常),所以我想恢复!但是恢复按钮丢失了(在冲突模式下消失!)所以我必须进行合并,并且合并不起作用,会引发某种错误。我懒得去阅读(也许我应该阅读并将其作为错误提交给 subclipse 维护者;-(),我知道乌龟会起作用,你知道吗,它起作用了。有一个 REVERT 选项。所以

@Tom Brito,尝试命令行,尝试 Tortoisse,然后你可以查看 subclipse 更改日志并提交错误,我认为 subclipse 只是忘记向我们显示一些目录更改和更新(或者它被设计为不这样做?),但是。我可能错了。

Subclipse has many problems like this. It works 90% of time, and then it just DOES NOT work as it should! I am using subclipse, since it is very well integrated into eclipse, and when I have problem or some bigger moves needed in svn (like merging some branch) I use Tortoisse.

I had the thing with directory like you. Then I just run the TortoiseSVN like @luiscolorado suggests, and it helped. Tortoise is so great tool (it has many great features for diffing, applying patches, getting patches and so on.).

Today I had a problem when I have removed a file, and someone had changed the same file! Then subclipse shows conflict (up to this point everything is ok), so I wanted to revert! But then the revert button is missing (disappears when inconflict mode!) so I have to do merge, and merge does not work, throws some kind of error. I didn't bother to read (maybe I should read and file it as a bug to subclipse maintainers ;-(), I knew the tortoisse will work, and you know what, it worked. There was a REVERT option.

So @Tom Brito, try command line, try Tortoisse, and then you can look at the subclipse changelog and file a bug. I think that subclipse just forgets to show us some directory changes and updates (or it is designed not to do it?), but I may be wrong.

叫思念不要吵 2024-09-07 20:17:33

Tom,

您可能想尝试 TortoiseSVN,并手动更新项目工作区。在硬盘中找到项目目录的位置,然后尝试使用 TortoiseSVN(如果您愿意,也可以使用命令行)进行更新。

导致此问题的一个常见原因是在没有“通知”SVN 的情况下删除了目录。例如,如果您使用操作系统而不是使用SVN手动删除目录,就会出现此问题。

如果您在安装 subversion 插件之前删除了该目录,但该项目已存在于存储库中,您将遇到此问题。在这种情况下,解决方案是重新创建目录、更新/提交,然后再次删除该目录。

祝你好运。

Tom,

You might want to try TortoiseSVN, and manually update the project workspace. Find the location of your project directory in your hard drive, and then try TortoiseSVN (or the command line if it's your preference) to do the update.

A frequent cause of this problem is to delete the directory without "informing" SVN. For instance, if you manually delete the directory using the operating system instead of using SVN, you will have this problem.

If you removed the directory before you installed the subversion plug-in, but the project already existed in the repository, you will experiment this problem. A solution, in this case, would be to recreate the directory, updating/committing, and then delete again the directory.

Good luck.

最佳男配角 2024-09-07 20:17:33

我的解决方案是

  1. 删除文件夹中的所有项目
  2. 提交到存储库将
  3. 文件夹更新到 HEAD
  4. 删除 Eclipse 中的文件夹
  5. 提交到存储库

也许有点麻烦,但它总是有效

My solution to this was

  1. Delete all items in folder
  2. Commit to repository
  3. Update folder to HEAD
  4. Delete folder in Eclipse
  5. Commit to repository

A bit cumbersome, maybe, but it always works

苏佲洛 2024-09-07 20:17:33

在相同情况下唯一的工作方式是通过命令行。子剪辑仍然不完美..

The only working way in same cases is via command line. The subclipse is still not perfect..

挽梦忆笙歌 2024-09-07 20:17:32

Subclipse 常见问题解答 是否解决了这个问题?

只要您在错误消息中看到“过时”,就意味着存储库中项目的修订版比本地工作副本中的副本新
解决方案始终是运行更新,以便您的工作副本与存储库保持同步,然后再次提交(假设更新没有产生任何冲突)。

  • 对于文件来说,通常很容易理解这种情况如何以及为何发生。
  • 但是,Subversion 也对文件夹进行版本控制,并且通常在文件夹中最常发生此问题。
    Subversion 不允许您删除/重命名文件夹或更改其版本化属性,除非该文件夹的本地副本位于存储库中该文件夹的 HEAD 版本。

您的下一个问题可能是:
“好吧,我也许可以理解,但是为什么我的文件夹过时了?我是唯一在这个存储库中工作的人。

这是一个有效的问题,答案在于 Subversion 的工作方式。
当您提交对文件的更改时,工作副本中的文件修订版将在提交完成后更新为新修订版,但该文件的父文件夹的版本不会更新。
这是因为该文件夹中的其他文件可能已添加/删除,并且在您运行更新之前,该文件夹并不真正处于该新版本。
这称为“混合修订工作副本”。

总而言之,答案始终是进行更新,以便将文件夹或文件更新为其 HEAD 版本。


关于“混合修订工作副本”:

一种特殊的灵活性是能够拥有包含文件和目录的工作副本,并混合不同的工作修订号。

Subversion 的基本规则之一是“推”动作不会导致“拉”,反之亦然。
仅仅因为您已准备好向存储库提交新更改,并不意味着您已准备好接收其他人的更改。

事实是,每次运行 svn commit 你的工作副本最终都会出现一些修订的混合
您刚刚提交的事情被标记为比其他所有事情都有更大的工作修订。多次提交后(中间没有更新),您的工作副本将包含修订的完整组合

(这就是为什么,我相信,您无法在删除文件夹的后续提交中重现“过时”消息:您的更新确实解决“混合修订”状态。)

混合修订有局限性

您无法提交删除不完全最新的文件或目录
如果存储库中存在该项目的较新版本,您的删除尝试将被拒绝,以防止您意外破坏尚未看到的更改。

Isn't that addressed by the Subclipse FAQ?

Whenever you see "out of date" in an error message it means that the revision of the item in the repository is newer than the copy in your local working copy.
The solution is always going to be to run an update, so that your working copy is up to date with the repository, and then do the commit again (assuming that the update did not generate any conflicts).

  • For files, this is usually pretty easy to understand how and why this happens.
  • However, Subversion also versions folders, and it is usually with folders that this problem most often happens.
    Subversion does not allow you to delete/rename a folder OR change its versioned properties, UNLESS the local copy of the folder is at the HEAD revision of the folder in the repository.

Your next question might be:
"OK, I can maybe understand that, but why is my folder out of date? I am the only person working in this repository."

That is a valid question, the answer lies in the way that Subversion works.
When you commit a change to a file, the revision of the file in your working copy is updated to that new revision when the commit completes, however the version of the parent folder(s) of that file is not updated.
This is because there may have been adds/deletes to other files in that folder and until you have run an update, the folder is not really at that new revision.
This is called "mixed revision working copies".

In summary, the answer is always to do an update so that the folder or file is updated to its HEAD revision.


About "Mixed Revision Working Copies":

One special kind of flexibility is the ability to have a working copy containing files and directories with a mix of different working revision numbers.

One of the fundamental rules of Subversion is that a “push” action does not cause a “pull,” nor vice versa.
Just because you're ready to submit new changes to the repository doesn't mean you're ready to receive changes from other people.

The fact is, every time you run svn commit your working copy ends up with some mixture of revisions.
The things you just committed are marked as having larger working revisions than everything else. After several commits (with no updates in between), your working copy will contain a whole mixture of revisions

(and that is why, I believe, you cannot reproduce your "out of date" message on subsequent commits with folder deleted: your update did solve the "mixed revision" state.)

Mixed revisions have limitations

You cannot commit the deletion of a file or directory that isn't fully up to date.
If a newer version of the item exists in the repository, your attempt to delete will be rejected to prevent you from accidentally destroying changes you've not yet seen.

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