Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

eclipse mercurial conflict after pull: how to pick remote file

I have a repository at bitbucket and I was pulling a changeset from it to Eclipse using Mercurial plugin. Some of the files in Eclipse were modified, so it causes conflicts.

enter image description here

enter image description here

I just want to give up local file and update it with remotes. So I right click project and choose Team - Synchronize with

But what should I click to select remote file and give up a local?

enter image description here

enter image description here

like image 585
Nikolay Kuznetsov Avatar asked Dec 19 '12 09:12

Nikolay Kuznetsov


People also ask

How do I resolve merge conflicts in eclipse?

To resolve the conflicts in the Eclipse Compare Editor, right-click the conflicted file and click Open in compare editor. In the Compare Editor, you can use the Copy all nonconflicting changes from right to left button to reduce the number of conflicts that you must review and resolve yourself.

What does red diamond mean in eclipse?

To pull in Eclipse, click the following menu option: The result will either indicate that you pulled cleanly or that there is a conflict. The best way to tell if you currently have a conflict is to look for the red diamond icon in the list of files.


1 Answers

Just right click on the file and select Revert.. as you want to discard your changes.

However in general, if you care about your changes uncommitted workspace update is not recommended. Instead commit your changes first and then rebase or merge after pulling.

  • Revert - this removes uncommitted changes. It makes the file contents the same as they are in the latest commit
  • Update - this moves the working directory towards the newest topological head on the current branch.
  • Rebase - this moves a committed changeset from where it was originally committed so that it becomes based on the target changeset. If in doubt use merge rather than rebase as rebase is an advanced operation.

The problem with uncommitted workspace update is that if there are conflicts there's no easy way to get back to the previous state. If there are conflicts with merge or rebase and you don't want to resolve them now you can press the Abort button in the Mercurial Merge view and it will go back to how it was before.

like image 127
johnpeb Avatar answered Oct 06 '22 02:10

johnpeb