eclipse 提交期间SVN合并冲突

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1238585/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 18:52:28  来源:igfitidea点击:

SVN Merge conflict during commit

eclipsesvnconflictsubversivesvn-merge

提问by Boris Pavlovi?

Eclipse + Subversive plugin

Eclipse + 颠覆性插件

On commiting a directory which is out of sync with the SVN a message pops up:

在提交与 SVN 不同步的目录时,会弹出一条消息:

Merge conflict during commit
svn: Commit failed (details follow):
svn: File or directory '.' is out of date; try updating
svn: resource out of date; try updating

Tried to update the whole project from Eclipse Navigator view (right click>Refresh or F5) and the problem still persists.

尝试从 Eclipse 导航器视图(右键单击>刷新或 F5)更新整个项目,但问题仍然存在。

Is there something that can be done in this case?

在这种情况下有什么可以做的吗?

回答by sleske

You are mixing up two different operation in Eclipse:

您在 Eclipse 中混合了两种不同的操作:

  • Update (from version control)
  • 更新(来自版本控制)

and

  • Refresh
  • 刷新

"update" means retrieve the most recent version of a file(s) from the version control system. "Refresh" just means that Eclipse will update its view of the local filesystem, in case a file was changed outside Eclipse.

“更新”表示从版本控制系统中检索文件的最新版本。“刷新”仅意味着 Eclipse 将更新其本地文件系统的视图,以防文件在 Eclipse 之外发生更改。

You need to do an update (Team->Update).

您需要进行更新(团队-> 更新)。

回答by RJFalconer

You should update, resolve conflicts, then commit again.

您应该更新,解决冲突,然后再次提交。

See this linkfor help on resolving conflicts in eclipse.

请参阅此链接以获取有关解决 Eclipse 冲突的帮助。

回答by Michael Wiles

Sometimes eclipse+subversion gets a bit lost and a more robust solution is called for:

有时 eclipse+subversion 会有点迷失,需要一个更健壮的解决方案:

  1. Copy the code with changes to a different location (preferably via copy and paste).
  2. Replace with latest from repo (or revert) on the directory giving the problem
  3. Copy the changes back (via cut and paste again) and check in.
  1. 将更改后的代码复制到不同的位置(最好通过复制和粘贴)。
  2. 在出现问题的目录上替换为最新的 repo(或还原)
  3. 将更改复制回来(通过再次剪切和粘贴)并签入。

回答by Kate

try to delete .svn/all-wcprops. maybe it will help

尝试删除 .svn/all-wcprops。也许它会有所帮助

回答by Glen

Someone else has modified this directory on you.

其他人已经在你身上修改了这个目录。

You need to do a svn update to get the latest version before commiting.

在提交之前,您需要执行 svn update 以获取最新版本。

svn update

or

或者

right click > Team > Update

Refresh or F5 will only re-read what's currently checked out and check for local changes, i.e. changes made outside of eclipse.

Refresh 或 F5 只会重新读取当前检出的内容并检查本地更改,即在 eclipse 之外所做的更改。

The svn update command pulls any changes made remotely (commits) down to your workspace.

svn update 命令将远程(提交)所做的任何更改拉到您的工作区。

回答by Kevin Crowell

You need to do an svn update to make sure you are completely up-to-date before committing.

在提交之前,您需要执行 svn update 以确保您完全是最新的。

svn update

If the update does not work, you may need to do a cleanup.

如果更新不起作用,您可能需要进行清理。

svn cleanup

You should be able to find both of these commands in your SVN client outside of Eclipse if you are using one.

如果您正在使用这两个命令,那么您应该能够在 Eclipse 之外的 SVN 客户端中找到这两个命令。