Request for comments about using named branches to track releases
Mario Castelán Castro
marioxcc.MT at yandex.com
Fri Aug 25 02:37:58 UTC 2017
Hello.
Suppose I want to have at least 2 named branches in a repository, one
âstableâ and the other âdevelopmentâ so that *all* development happens
in âdevelopmentâ (or any branch but âstableâ). The only changesets in
âstableâ will be merges from âdevelopmentâ or changes affecting only the
literal version string and tagging.
The program must print its own version when requested. The version must
be present somewhere in the source; it can not be generated at
compile-time by calling Mercurial. Obviously each release will have a
unique version. Now the questions are: When should the version number be
changed? What value should the version string have on the âdevelopment
branchâ? Exactly what changesets will be on âstableâ?
Option 1: The development branch always has a special value outside the
normal versioning scheme like âdevâ. When a release is made, exactly 2
commits are made in the âstableâ branch: (1) Merge âdevelopmentâ and in
the *same* changeset, set version to a normal value like â1.2.9â. (2)
Add a commit with âhg tagâ to tag the new release.
Option 2: The development branch always has a value like â1.2.8-devâ
where â1.2.8â is the latest release already made (The changesets before
before the first release must obviously use a different scheme). When a
release is made, 3 commits are made: (1) Change version to a normal
version number like â1.2.9â. (2) Add a tag for the previous changeset,
which marks the release. (3) Create a merge from the changeset of (2) to
âstableâ. Note that then the âstableâ branch is only merges, except
possibly for the first changeset. Any further commit before the next
release *must* add the â-devâ part to the version string.
Option 3: Like option 2, but branches are interleaved and there are no
spurious merges. The same convention for the version string and release
changesets are followed as in (2), except that *only* those 2 changesets
pertain to âstableâ and there is no merge. The first commit that makes
the release is made *on top* of the latest development commit.
Option 4: Like option 3, except that the first commit that makes the
release is a marge which previous tag commit as the first parent, and
I request comments addressing reasons to choose one option instead of
another. Suggestions for alternatives to options not listed here are
welcome. Also please let me know if there is a well established
convention in the Mercurial community.
Thanks.
--
Do not eat animals, respect them as you respect people.
https://duckduckgo.com/?q=how+to+(become+OR+eat)+vegan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: OpenPGP digital signature
URL: <http://www.mercurial-scm.org/pipermail/mercurial/attachments/20170824/8d9a440f/attachment.sig>
More information about the Mercurial
mailing list