Reputation: 9112
Here is what I'm trying to do:
But at this point, mercurial is forcing me to do hg push --new-branch
to add the branch to the remote repository. I don't want the branch in the repo, I just want to create a branch locally, do all the changes I wanna do, then when I'm ready to merge, move to default, pull and update changes on default (any other person might have added changes on default) and finally merge my branch into default, and making new_branch dissapear of possible, because I won't need it anymore once it's merged into default.
What am I doing wrong, I come from git if you haven't noticed.
Upvotes: 3
Views: 258
Reputation: 78350
For what you're doing you want a 'bookmark' not a 'branch'. In Mercurial a branch is called a "named branch" and every changeset is on one and only one named branch. That branch name is part of the commit and included in the commit's hash. When you've created commits with a specific branch name burned into them you can't push them (or their descendants) without that branch name going with them.
A bookmark on the other hand is just a pointer to a commit. It moves forward on commit -- in other words very much like what git calls a branch (cough throwing 20 years of terminology out the window :).
Substitute bookmark for branch in your commands above and everything will work pretty much exactly like you'd imagine.
Upvotes: 6