如何解决 Eclipse SVN 中的冲突
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18712781/
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
How to Resolve Conflict in Eclipse SVN
提问by princepiero
While using Eclipse in coding and SVN for the team repository, I am having trouble in having conflicts in Eclipse.
在团队存储库中使用 Eclipse 进行编码和 SVN 时,我在 Eclipse 中遇到冲突时遇到了麻烦。
Supposing I have a conflict and there 3 automatically generated files. Once I have resolved the conflict, I can't find the command how to commit the solution of the conflict and automatically deleting the generated files.
假设我有冲突并且有 3 个自动生成的文件。一旦我解决了冲突,我找不到命令如何提交冲突的解决方案并自动删除生成的文件。
In SVN outside Eclipse, there is a Resolve Conflict function and the codes will be updated. Also, the generated files for the conflict will be deleted. Is there a similar method in Eclipse or I have to manually delete the generated files and commit the solution?
在 Eclipse 之外的 SVN 中,有一个 Resolve Conflict 功能,代码将被更新。此外,为冲突生成的文件将被删除。Eclipse中是否有类似的方法,或者我必须手动删除生成的文件并提交解决方案?
采纳答案by princepiero
Aside from the answers shown in the related question, it is also possible to solve the conflict, delete the automatically generated files and Mark as Merged.
除了相关问题中显示的答案外,还可以解决冲突,删除自动生成的文件并标记为合并。
回答by user3782832
I had the same problem and none of the solutions mentioned resolved my issue. When I would right-click on the folder, there was no option to resolve the conflict or mark as resolved or anything.
我遇到了同样的问题,提到的解决方案都没有解决我的问题。当我右键单击该文件夹时,没有解决冲突或标记为已解决或任何其他内容的选项。
The way I resolved it in Eclipse (with Subclipse plugin), was right-clicking on the folder and selecting "Show Tree Conflicts". This opened up a view pane in Eclipse called "SVN Tree Conflicts" which showed the folder in question.
我在 Eclipse(使用 Subclipse 插件)中解决它的方法是右键单击文件夹并选择“显示树冲突”。这会在 Eclipse 中打开一个名为“SVN Tree Conflicts”的视图窗格,其中显示了有问题的文件夹。
I right-clicked that message and selected "Resolve". Then a window popped up, asking what I wanted to do. I basically unchecked all the boxes, that had to do with accepting left file or right file or merging. Because basically, I just wanted to mark the conflict as resolved, and accept the folder as it was, from the repository.
我右键单击该消息并选择“解决”。然后弹出一个窗口,问我想做什么。我基本上取消了所有复选框,这与接受左文件或右文件或合并有关。因为基本上,我只想将冲突标记为已解决,并从存储库中按原样接受文件夹。
Then I was able to continue updating my project without issues.
然后我能够继续更新我的项目而没有问题。
回答by Scary Wombat
In Eclipse on the Team menu you can choose either edit conflicts
or mark resolved
在 Eclipse 的 Team 菜单上,您可以选择edit conflicts
或mark resolved
回答by Ben Taliadoros
The way I do it is change perspective to 'Team Synchronising' and in the synchronise tab you right click the file and select 'Mark as merged'
我这样做的方法是将视角更改为“团队同步”,然后在同步选项卡中右键单击该文件并选择“标记为已合并”
回答by David C
Another solution (similar to princepieros) is to Right-Click your project -> Execute an entire commit -> It will show "Conflict" items -> Right-Click these items and hit "Mark as Merged" or "Edit Conflict". This did the trick for me. Hope it helps.
另一种解决方案(类似于princepieros)是右键单击您的项目-> 执行整个提交-> 它将显示“冲突”项目-> 右键单击这些项目并点击“标记为合并”或“编辑冲突”。这对我有用。希望能帮助到你。