I. Keep calm and keep the default branch clean and ready for deploy… ALWAYS!
# just do it
II. Keep calm and use Named Branches for every new feature:
hg pull # get all the changes so far
hg update -C default # go to the default branch and clean it from untracked fileshg branch my_new_feature
hg commit -m ‘initial commit for my_new_feature’
hg push –new-branch # the new branch is in the repository now
# continue working as usual up to the moment when you have to merge your changes
III. Keep calm and set tags for every deployed version:
# – yey, we have just deployed. Let’s put a tag in Mercurial.
hg tag v1.0# … 1 week later.
# – jeez, there’s a bug, but we can not reproduce it by the current code base in the default…
# – well, then just rollback to the latest release version – v1.0hg update v1.0
hg branch my_fix_in_v1.0
hg commit -m ‘initial commit in my_fix_in_v1.0’
# make your fix and merge to the default later
IV. Keep calm and read on here:
http://bit.ly/cvwklr Chapter 8. Managing releases and branchy development