Tom Miller
Tom Miller

Reputation: 435

Having Mercurial issues with push after pulling changes into my local repository

I'm fairly new to Mercurial so I'm hoping someone can help me as I'm currently close to tears ;)

So I've been working locally and committing to my local repository. I wanted to push my changes to the server so I first pulled the latest changes. All ok so far.

I then tried to do a push but got the following error:

[Error: abort: push creates new remote head 80394c55f2dc!] new remote head 80394c55f2dc [Error: (did you forget to merge? use push -f to force)]

I then read that a pull doesn't merge the changes into my local repository.

I loaded up Workbench so I can now see my changes and the other dev's changes that have been pulled. I then did a merge on the other dev's most recent revision.

I now have two rev 112 one with a description of Merge and 112+ which says * Working Directory *

I hope I've explained this properly and I can provide screen shots if required but I'm slightly stumped.

I just need to get all changes merged and pushed.

Upvotes: 0

Views: 82

Answers (1)

smooth reggae
smooth reggae

Reputation: 2219

Here's a blog post that does a decent job of explaining what you need to do. The fifth image in the post matches your situation, based on your description. In addition to revision 112, you probably have another head at another revision. You will have to click on that head and then select Merge with Local from the context menu. TortoiseHg will then guide you through the process of merging these two heads. If you do not have to intervene at all to resolve any conflicts, you will end up with a dialog with a default commit message (Merge) for the new changeset that represents a merge of the two heads (one of which came from your work and the other that came in when you pulled).

The Mercurial wiki has a nice page that should help you get comfortable working with Mercurial. I am sure you will do just fine :)

Upvotes: 1

Related Questions