views:

113

answers:

1

If I create a branch:

hg branch branch-A

and commit to it:

hg commit -m "improvement A-1"

and then create a second branch:

hg branch branch-B

and commit to it:

hg commit -m "improvement B-1"

If I want to add my next change to branch-A do I simply type:

hg branch branch-A

and commit to it as before:

hg commit -m "improvement A-2"
+8  A: 
hg branch

always creates a branch (although it warns you if the branch already exists.) To switch to an existing branch, either

hg update -r <some revision in that branch>

or

hg update <that branch>

will switch to that branch.

David Winslow
Also, I usually create a tag for revisions for which I'm starting a new branch. This helps me when I need to update to that specific revision (it happens quite often).
Roberto Aloi