This is a cousin question with my earlier question of "How to manage concurrent development with mercurial", which covers individual developer workflow. The answer to this question will actually influence the choice for developer workflow.
This is NOT a general "release management best practice" or CI question, as it has been asked many times with good answers, and there's a huge body of literature available to kill time.
I'm only asking for specific ways to use mercurial within the context of release management.
The most obvious and predominant answer would supposedly be stable/default, which is thoroughly covered by the beautiful blog of @Steve Losh, and more concisely in an answer from him. It's simple and effective.
A prominent example of this setup is hg itself. hg uses a few more repositories for active development, but for release management purposes everything seems to be contained in the stable/default branches of the main repo.
The hg setup actually manifests a variation, or rather an extended version, of stable/default: branch clone. I described the process in an answer to a question on named branch vs. multiple repos (with another great answer from @Martin Geisler). What I forgot to mention in my answer is how branch clone works for developer workflow: if you need to fix a bug for a branch, you would hg clone <main repo>#<branch>
but not the branch clone, because your changeset will still go back to the main repo and pushed out to branch clone automatically. Of course you can choose not to clone and just hg update <branch>
in your main clone, but most arguments for using separate clones (especially the independent build) apply here.
Now back to the question: Are there any other ways that fit different real-world scenarios? For example, a traditional major/minor/patch release cycle with long lapse between releases probably require quite a different workflow than a fast-paced, release-as-you-go web application. Please also comment on the stable/default and branch clone approaches if you feel like.
Since this is almost a survey question, I can only try to accept the "best" answer subjectively. If I can get a few more answers than my developer workflow question, that is.
Thank you for all your inputs!
What Is Mercurial? Mercurial is a free, distributed version control system. It's also referred to as a revision control system or Mercurial source control. It is used by software development teams to manage and track changes across projects.
Mercurial is a free, distributed source control management tool.
According to Chan, less than 1 per cent of new Bitbucket users choose Mercurial as their version control system. And she cites data from StackOverflow's 2018 Developer Survey that's no less damning: 87 per cent of developers use Git and only about 4 per cent user Mercurial.
I'm in the process of re-designing our workflow for release. So I've found this question. I've decided to wrote my experience. For what it's worth ...
For development, we are using something that seems to be variation of what you call the stable/default workflow (of course everything goes through commands that enforce the workflow, I call them myw
thereafter) :
myw create theproject
which create the stable/dev clones for theproject on the server and that locally (on the developer computer)myw clone theproject dev mygreatfeature
that : myw fetch dev
and myw fetch stable
anytimemyw close theproject mygreatfeature
All of that works great and is pretty smooth. We have preferred clones to named branches as it was simple to really close a feature branch, and at the time the mercurial "named branch" part seemed like "work in progress".
The release part of the workflow is presently done basically like that :
myw release 1.2.3_RC2
that : myw release 1.2.3
That works pretty well, even if we needs to improve some commands to smooth the process. One of the main drawback it's that's a lot of clones :)
For the management of old releases, we have currently a clone of stable done for each major release. As there is no big need to backport many features, we just have to cherry-pick some really bad bugs with hg transplant
(great extension by the way).
We have used that for about a year, and we certainly need to improve our homemade commands, especially for the release part :)
The main drawback is that you have to give you/your team some tools to handle it because without them it could be unmanageable, hence our myw
homemade set of commands. As usual, the feature branch should not last for too long, or merging can be hard to do. Things like refactoring/renaming has to be done at chosen points, or it will give your team a lot of merging work.
As we are going to have more and more versions to maintain, I'm trying to improve the 'old release but have to support' management part. Reading Bert F comment, I've read this great article. There is good ideas and it is well explained with a really good scheme ! It seems someone has implemented the hg version of his tool git-flow as hg-flow. Something to consider. I like the release and hotfixes branches. And I think that enforcing such workflow with a tool is pretty well mandatory !
my2c
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