- My main development descends from the @ bookmark, just like the "develop" branch of Driessen's model. Conveniently, Mercurial automatically updates to this bookmark when cloning, if there's no obvious target revision.
- Although I rarely bother with them, feature branches are easily supported as bookmarked alternate heads of the default named branch. I may use them more often once NBTParse approaches stability and it becomes necessary to keep the trunk stable(ish) leading up to a beta release.
- I use release branches, much like Driessen. Mine are named branches instead of bookmarks, but this is mostly a matter of the former not existing under Git. The release branches also have bookmarks, which are reused from one branch to the next; this makes it easy to (automatically) find the current unstable release branch (it's just release-unstable), for example.
- Much like feature branches, hotfix branches are just bookmarked alternate heads of release branches. Again, I rarely bother with them, since my release branches remain open for as long as the released product is supported. However, they can be useful if a fix is likely to require multiple commits or the attention of multiple developers.
- Now we come to the "master" branch. I must admit, I don't quite have a master branch, but I have the next best thing. All my releases are tagged, and the latest unstable (and stable, once we hit stable) is bookmarked. I can just do hg log -r 'tag("re:version-.*")' to find everything that would have been on the master branch if I had one. If I only want stable releases, I can use a more precise regex (e.g. ^version-\d+\.\d+\.\d+$). Oh, and those revsets work in Bitbucket's search interface, too.
Friday, April 3, 2015
Why I don't use hg-flow
I recently had a chance to read A successful Git branching model (the branching model underlying the popular git-flow and hg-flow extensions), and I found it rather interesting. For NBTParse, I've been following a modified form of Mercurial's standard branching. I thought about trying to adapt my work to use hg-flow, but I realized the differences are largely cosmetic: