If there is a linear path between the current parent version and the target revision, you can simply issue
hg update right-branch
and Mercurial will merge the changes of your working copy into the target version.
This is done using a tool with a full merge of tools , so things like renaming are taken into account, and you get a three-way merge program in case of conflict. Shelf-based and diff-based underlays do not have this and require you to fix conflicts manually using .rej files. You can even see the current merge status with hg resolve --list and re-merge the selected files, since Mercurial will make the necessary backups for you.
If there is no linear path, you will receive this warning:
abort: crosses branches (merge branches or use
Then you can get what you want by first updating back to a common ancestor and then updating it again. I am not 100% sure why we give this warning, but a search for mail list archives should give you an answer if you are interested.
source share