How to see the mercury difference

abort: push creates new remote heads! (did you forget to merge? use push -f to force) 

Is there a way to see what differences I'm processing? I am tempted to do push -f and first want to see what I am rewriting. Thanks!

+2
source share
3 answers

Don’t do push -f ever :) This will most likely fail, but don’t do it anyway. I found out that this is the hard way.

The error occurs due to the fact that some of them have already dragged something to the main repository. You need to make pull changes before pushing them. To find out what you get, run hg in or hg incoming (in is the alias of the incoming), and then run hg pull -u . See this page for more information on what else you can do.

+3
source

To see the differences between local and remote repositories, run hg incoming . Then you can decide if you want

  • paste the changes anyway and create a new head on the far side (using push -f ),
  • or if it is better to delete deleted changes first, merge them locally and click the merged changes button.

The latter is usually preferable, it depends on how you work with other developers. Note that if you first perform hg pull , your local changes will not be affected, so you can check for remote changes side by side with your local ones, and you can still decide not to merge and do hg push -f anyway.

+3
source

You need to take the first step. Then merge. Then click.

push -f can be dangerous.

To answer your question, you can see the changes made:

 hg status 

and

 hg diff 

in your local repository.

 hg incoming 

shows any changes to the remote repository that you have not yet pulled.

+1
source

All Articles