I'm new to Mercurial, and I'm using the Stable/Default branching system. We're all on Windows here, and I'm trying to get everyone else to work in this system. We're all using TortoiseHg. I'm trying to document how to Merge changes into stable and tag releases, but I've only been using Mercurial for about three weeks, so I'm not even sure I'm doing this correctly. Also, TortoiseHg seems to be missing a few options available from the command line. But, I need to make this work from the Windows shell, or it won't get adopted here.
All of our programming work is done in default, and the stable branch is used only for releases of the software. One thing that leads me to believe I'm doing something wrong is that, after every merge, I have to re-make the stable branch. Is that normal? Seems counter-intuitive.
Below is the procedure I wrote up. Please feel free to point out my idiocy or ask any questions. And thank you in advance for any comments.
On my laptop, there are two directories for each project. The devel directory stores a clone of the default branch,
===============
Merging the branches and creating a stable release, TortoiseHg
-- Commit in the devel repository.
-- Open the devel local directory.
-- Start HgWorkbench.
-- Click the latest stable version of the stable branch.
-- Select Merge with local...
-- Synchronize and push changes to the remote repository.
-- Go to the local stable repository.
-- Synchronize and pull from the remote repository.
-- Update to the latest default branch. Picking "update to tip" should be best.
-- TortoiseHg -> commit. Commit to branch "stable." You'll need to re-create a new branch. When it asks, select "Restart branch."
-- Open HgWorkbench and add a tag for the latest stable version. Example "Version X.X"
-- Synchronize and push to the remote repository. Use the Options button in the Sync dialog box to bring up the "sync options" dialog. In the bottom field labeled "Branch", type "stable"
-- Return to the local "devel" repository.
-- Synchronize and pull from the remote repository. Use the Options button in the Sync dialog box to bring up the "sync options" dialog. In the bottom field labeled "Branch", make sure the field is blank. Otherwise, it will default to the "stable" branch.
There's no need for the second clone to achieve what you want and I think that it adds complexity where it isn't needed.
This is what I'd do:
default
branchHgWorkbench
stable
branchUpdate...
in the pop up menu and press the Update
button in the pop up window (use the default options)default
branchMerge with local...
Next
buttonstable
) click the Next
button againCommit
button and the press Finish
on the next stepstable
branch and choose Tag...
, enter the tag name and press the Add
button.default
branch and choose Update...
using the default options againYou've now got a tagged stable
branch and are back on the default
branch to continue development. When you're ready to release a new stable
version then repeat the steps above from step 3.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With