klenwell information services : MercurialBranches

Revision [1623]

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

Mercurial Branches

return to DevMercurial

Merging Branches

Simple Example: merge new-branch back into default
$ hg branches
new-branch                     200:ad96a97024ce
default                        100:019016980509 (inactive)

$ hg branch
new-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
default


Usage
$ 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.

options:

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


References

Named Branches (mercurial.selenic.com)