Why can't I push this change to my 'main' mercurial repository?

Neil Trodden picture Neil Trodden · Mar 2, 2010 · Viewed 18.3k times · Source

I am trying to grok Mercurial and hope I am just getting confused here!

I have a repository ('main') that I have cloned ('clone'), , both on my own machine. Both were completely in sync with each other.

I decided to play with named branches so the next time I committed on my 'clone' I did it under a branch name of 'case1212' and while it seems to have dealt with the commit properly on my clone, I cannot push these changes back to 'main'. The error given is:

abort: push creates new remote branch 'case1212'!

...and it suggests that I might need to merge first? What am I supposed to merge on that 'clone' repository? When I try to pull from 'main', there are no changes.

I'm pretty sure I actually would want it to create a remote branch in my 'main' repository so people who update from it can see that branch.

Answer

Nate Heinrich picture Nate Heinrich · Mar 2, 2010

Mercurial's default behavior prevents you from creating remote branches. If you want to do this, you need to force-push.

Synchronize menu in the window you show, there is an option for force push.