Mercurial push creates new remote head after a merge

mercurial, merge

Solution

You say you've tried `updating / merging again`, but I think you need to `pull / merge` again. If you only have one local head and your `push` will be creating additional remote heads, it's likely that there have been new heads pushed to the remote since you started "the update/merge dance"

Problem

I have two repositories: A (my trunk) and B (a clone of A for building new features). I have been doing some work in repo B and I wanted to update it with changes from repo A. I've pulled changes from A into B and gone through the update/merge dance and am ready to push the merged changes up to repo B on my server. When I attempt to push these changes it tells me that I'll be creating a new remote head. When I run `hg heads` I only have a single head for repo B locally. When I check `hg branches` I only have the default branch in repo B, which is what I want. I've tried updating/merging again but it can't merge an ancestor, so I'm fresh out of ideas. Should I really just force the push since everything looks clean on my local side?

Original source