klenwell information services : MercurialBranches

Revision [1624]

This is an old revision of MercurialBranches made by KlenwellAdmin on 2010-10-08 17:42:10.

Mercurial Branches

return to DevMercurial

Merging Branches

Simple Example: merge new-branch back into default

Note: hg update -C <branch_name> switches to the given branch.
$ hg branches
new-branch                     200:ad96a97024ce
default                        100:019016980509 (inactive)

$ hg branch

$ hg update -C default
10 files updated, 0 files merged, 5 files removed, 0 files unresolved
(branch merge, don't forget to commit)

$ hg commit -m "merged new-branch back into default"

$ hg branch

$ hg merge --usage
hg merge: option --usage not recognized
hg merge [-f] [[-r] REV]

merge working directory with another revision

	Merge the contents of the current working directory and the
	requested revision. Files that changed between either parent are
	marked as changed for the next commit and a commit must be
	performed before any further updates are allowed.

	If no revision is specified, the working directory's parent is a
	head revision, and the repository contains exactly one other head,
	the other head is merged with by default.  Otherwise, an explicit
	revision to merge with must be provided.


 -f --force  force a merge with outstanding changes
 -r --rev    revision to merge


Named Branches (mercurial.selenic.com)