Mercurial workflow Cheat Sheet

A Programming › Mercurial cheat sheet in English by alexo_o

Workflow based on http://nvie.com/posts/a-successful-git-branching-model/

10,054 views 3,252 downloads 11 Dec 2014 History
3.8 avg · 1 rating

Hotfix branches

May branch off from:
default
Must merge back into:
dev and default
Branch naming conven­tion:
hotfix-*
Creating the hotfix branch:
> hg up default
> hg branch hotfix­-1.2.1
> ./bump­-ve­rsi­on.sh 1.2.1
> hg commit -m "­Bumped version number to 1.2.1"
> ./bugfix
> hg commit -m "­Fixed severe production proble­m"

Finishing a hotfix branch:
> hg up default
> hg merge hotfix­-1.2.1
> hg tag 1.2.1
> hg com
> hg up dev
> hg merge hotfix­-1.2.1
> hg com
> hg up hotfix­-1.2.1
> hg com -m "­closing branch­" --clos­e-b­ranch

Feature branches

May branch off from:
dev
Must merge back into:
dev
Branch naming conven­tion:
anything except default, dev, release-, or hotfix-
Creating a feature branch:
> hg up dev
> hg branch myfeature

Incorp­orating a finished feature on develop:
> hg up dev
> hg pull
> hg merge myfeature
> hg com -m "­Merge myfeat­ure­"
> hg up myfeature
> hg com -m "­closing branch­" --clos­e-b­ranch
> hg up dev
> hg push





-

Release branches

May branch off from:
dev
Must merge back into:
dev and default
Branch naming conven­tion:
release-*
Creating a release branch:
> hg up dev
> hg branch releas­e-1.2
> ./bump­-ve­rsi­on.sh 1.2
> hg commit -m "­Bumped version number to 1.2"

Finishing a release branch:
> hg up default
> hg merge releas­e-1.2
> hg tag 1.2
> hg com
> hg up dev
> hg merge releas­e-1.2
> hg com
> hg up releas­e-1.2
> hg com -m "­closing branch­" --clos­e-b­ranch








-

Badges

Good Cheat Sheet Nice Cheat Sheet

Comments

No comments yet.

Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.