To create a stable
branch using VisualHg
follow the following steps:
- Click the Update to Revision button in Visual Studio
- In the Update to: drop down, select your tag and then press Update
- Click the Commit button in Visual Studio
- Click on the Branch: default button above the commit message
- Select Open a new named branch, type in
stable
into the box next to it and press Ok
- Type in a relevant message - perhaps "Create stable branch"
- Press the Commit button and confirm that you want to create the new branch.
This has created your stable
branch and it has the contents of your release except that the tag that you created is still on the default
branch. If you want to move it, you can do that from the workbench as follows:
- Click on Repo Browser button in Visual Studio
- Right click on the last revision on
stable
and click on Tag... on the pop up menu
- Select your tag from the drop down list
- Expand the options section and check Replace existing tag (-f/--force)
- Click Move followed by Close
If you are working with a central repository then you'll need to specify that you want to push the new branch by clicking on the Options button of the TortoiseHg Sync window and ticking the Allow push of a new branch (--new-branch) before you push the change.
In the future, you would merge from default
to stable
and then tag stable
when you want to make another release. To merge changes from default
into stable
do the following:
- Click on Repo Browser button in Visual Studio
- Find the latest change in
stable
, right click and then click Update...
- Find the latest change in
default
, right click then click Merge with local...
- Click Next
- The next page might tell you that you need to resolve conflicts - to do that click on the blue underlined resolved and resolve the conflicts in the pop up dialog by selecting the conflict in the top box and pressing the desired button on the right.
- The next page should say "No merge conflicts, ready to commit" - click Next
- Accept the default message or overwrite with your own and press Commit Now
- Press Finish
To merge the other way, update to default
in step one and merge from stable
in step 3.
To have two folders on your machine for one to contain default
and the other stable
, you would simply clone the repository a second time and keep one updated to the default
branch and the other updated to the stable
branch.