Frage

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

War es hilfreich?

Lösung

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.

Andere Tipps

In Eclipse I can do

  • right click on file in Package Explorer
  • Replace with
  • Another Changeset
  • select the latest changeset from Remote repository
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top