Bad idea to force creation of Mercurial remote heads (ie. branches)?

Posted by Chad Johnson on Stack Overflow See other posts from Stack Overflow or by Chad Johnson
Published on 2010-06-09T18:15:33Z Indexed on 2010/06/15 8:52 UTC
Read the original article Hit count: 169

Filed under:
|

I am developing a centralized web application, and I have a centralized Mercurial repository.

Locally I created a branch in my repository

hg branch my_branch

I then made some changes and committed. Then when I try to push, I get

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

I've just been using push -f. Is this bad? I WANT multiple branches in my central, remote repository, as I want to 1) back up my work and 2) allow other developers to develop with me on that branch.

Is it bad or something to have branches in my remote repository or something? Should I not be doing push -f (and if not, what should I do?)? Why does Joel say this in his tutorial:

alt text

Occasionally I've made a change in a branch, pushed, switched to another branch, and changes I had made in that branch I switch to were mysteriously reverted to a previous version from several commits ago. Maybe this is a symptom of forcing a push?

© Stack Overflow or respective owner

Related posts about mercurial

Related posts about branching