eclipse mercurial conflict after pull: how to pick remote file
Asked Answered
V

2

6

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

Ventage answered 19/12, 2012 at 9:9 Comment(0)
S
4

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.

Stirrup answered 19/12, 2012 at 20:17 Comment(2)
Thanks for answer. A big issue is that even though I can translate revert, rebase, update to my language. I don't understand the difference fully and concert not to spoil the source code by doing one of this by mistake. Can you explain a little? Then I would accept your answer.Ventage
I added more detail, hopefully it makes senseStirrup
V
0

In Eclipse I can do

  • right click on file in Package Explorer
  • Replace with
  • Another Changeset
  • select the latest changeset from Remote repository
Ventage answered 19/12, 2012 at 15:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.