threads / patch / 18632

patch, 2 partsAdd feature release instructions to MaintNotes addendum

Subject: [PATCH 1/2] Add feature release instructions to MaintNotes addendum

## tl;dr

9 messages between Mar 30, 2009 and Apr 1, 2009. Diffs are folded; open one to read it.

replies: 8people: 2as markdown or json

rocketraman@fastmail.fm· Mar 30, 2009, 05:35 UTC · lore
From: Raman Gupta <raman@rocketraman.com>

Based on a mailing list discussion, add the operations for creating a feature release.

Signed-off-by: Raman Gupta <raman@rocketraman.com>
---
 Documentation/howto/maintain-git.txt |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)
Show changes to Documentation/howto/maintain-git.txt +21 −0
diff --git a/Documentation/howto/maintain-git.txt b/Documentation/howto/maintain-git.txt
index 4357e26..f8b7614 100644
--- a/Documentation/howto/maintain-git.txt
+++ b/Documentation/howto/maintain-git.txt
@@ -244,6 +244,27 @@ by doing the following:
    repo.or.cz
 
 
+A feature release of git is made by tagging 'master' with a tag
+matching vX.Y.Z, where X.Y.Z is the feature release version.
+
+ - Optionally, track the current 'maint' branch to support
+   new releases for the older codebase if necessary.
+
+     $ git branch maint-X.Y.(Z-1) maint
+
+ - The 'maint' branch is updated to the new release.
+
+     $ git branch -f maint master
+
+ - The 'next' branch may be rebuilt from the tip of 'master'
+   using the surviving topics on 'next'.
+
+     $ git branch -f next master
+     $ git merge ai/topic_in_next1
+     $ git merge ai/topic_in_next2
+     ...
+
+
 Some observations to be made.
 
  * Each topic is tested individually, and also together with
-- 
1.6.2
rocketraman@fastmail.fm· Mar 30, 2009, 05:35 UTC · re: rocketraman@fastmail.fm · lore

[PATCH 2/2] Add feature release instructions to gitworkflows man page

From: Raman Gupta <raman@rocketraman.com>

Based on a mailing list discussion, add a description of the workflow, and associated commands, for creating a feature release.

Signed-off-by: Raman Gupta <raman@rocketraman.com>
---
 Documentation/gitworkflows.txt |   73 ++++++++++++++++++++++++++++++++++++++++
 1 files changed, 73 insertions(+), 0 deletions(-)
Show changes to Documentation/gitworkflows.txt +73 −0
diff --git a/Documentation/gitworkflows.txt b/Documentation/gitworkflows.txt
index 2b021e3..6a31d7b 100644
--- a/Documentation/gitworkflows.txt
+++ b/Documentation/gitworkflows.txt
@@ -348,6 +348,79 @@ in patches to figure out the merge base.  See linkgit:git-am[1] for
 other options.
 
 
+RELEASE WORKFLOW
+----------------
+
+The maintainer may use the following release workflow:
+
+He first tags the tip of 'master' with a release tag, then he updates
+the 'maint' branch to the current tip of 'master' for managing future
+maintenance fixes on the current release, and lastly he optionally
+rebuilds 'next' from the tip of 'master'.
+
+
+Release Tagging
+~~~~~~~~~~~~~~~
+
+The new feature release is tagged on 'master' with a tag matching
+vX.Y.Z, where X.Y.Z is the new feature release version.
+
+.Release tagging
+[caption="Recipe: "]
+==========================================
+`git tag -s -m "GIT X.Y.Z" vX.Y.Z master`
+==========================================
+
+
+Maintenance branch update
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The current maintenance branch is optionally copied to another branch
+named with the older release version number to allow for further
+maintenance releases on the older codebase. If the current tip of
+maint corresponds to an older release tag, then creating the maint
+branch for the older codebase can also be done later if and when it
+is required.
+
+.Copy maint
+[caption="Recipe: "]
+=====================================
+`git branch maint-X.Y.(Z-1) maint`
+=====================================
+
+'maint' is now updated to the new release code so that maintenance
+fixes can be merged for the current version.
+
+.Update maint to new release
+[caption="Recipe: "]
+=====================================
+* `git branch -f maint master`
+=====================================
+
+This creates 'maint' from 'master', while preserving the 'maint'
+reflog.
+
+
+Update next branch
+~~~~~~~~~~~~~~~~~~
+
+The 'next' branch may be rewound and rebuilt from the tip of 'master'
+using the surviving topics on 'next'.
+
+This step is optional. If it is done by the maintainer, then a public
+announcement will be made indicating that 'next' was rewound and
+rebuilt.
+
+.Update maint to new release
+[caption="Recipe: "]
+=====================================
+* `git branch -f next master`
+* `git merge ai/topic_in_next1`
+* `git merge ai/topic_in_next2`
+* ...
+=====================================
+
+
 SEE ALSO
 --------
 linkgit:gittutorial[7],
-- 
1.6.2
Junio C Hamano· Mar 30, 2009, 06:57 UTC · re: rocketraman@fastmail.fm · lore

Re: [PATCH 2/2] Add feature release instructions to gitworkflows man page

rocketraman@fastmail.fm writes:
> From: Raman Gupta <raman@rocketraman.com>
>
> Based on a mailing list discussion, add a description of the workflow,
> and associated commands, for creating a feature release.

The same comment applies to the other one, but this commit log message is really lacking. If you do not bother to summarize the discussion, place a pointer to the list archive, and more importantly, please describe *why* this change is desiable.

I am not sure rewinding and rebuilding of 'next', or even having 'next', is applicable for other projects as a BCP. Other parts (except for the "branch -f" bit I've already told you about in the other message) looked good.

Thanks.
Raman Gupta· Mar 30, 2009, 17:59 UTC · re: Junio C Hamano · lore

Re: [PATCH 2/2] Add feature release instructions to gitworkflows man page

Junio C Hamano wrote:
Show 11 quoted lines
> rocketraman@fastmail.fm writes:
> 
>> From: Raman Gupta <raman@rocketraman.com>
>>
>> Based on a mailing list discussion, add a description of the workflow,
>> and associated commands, for creating a feature release.
> 
> The same comment applies to the other one, but this commit log message is
> really lacking.  If you do not bother to summarize the discussion, place a
> pointer to the list archive, and more importantly, please describe *why*
> this change is desiable.
Ok will do.
> I am not sure rewinding and rebuilding of 'next', or even having 'next',
> is applicable for other projects as a BCP.  

Hmmm... The existing gitworkflows man page discusses the 'next' branch several times. I am simply expanding the document to cover the branch management associated with the git.git release process as well, which necessarily includes a discussion of 'next'.

If you wish to remove discussion of 'next' from this document, that is probably better done in a separate followup change. Though personally I think its a useful concept for readers to learn about as they are setting up their own workflows.

> Other parts (except for the "branch -f" bit I've already told you
> about in the other message) looked good.

I'll add some discussion about the branch -f bit -- I hope you agree that in this document that is distributed with git, some beginner-level explanation of the difference between the branch -f and the merge approach is warranted?

Cheers, Raman

Junio C Hamano· Mar 30, 2009, 18:14 UTC · re: Raman Gupta · lore

Re: [PATCH 2/2] Add feature release instructions to gitworkflows man page

Raman Gupta <rocketraman@fastmail.fm> writes:
Show 6 quoted lines
> Junio C Hamano wrote:
> ...
> If you wish to remove discussion of 'next' from this document, that is
> probably better done in a separate followup change. Though personally
> I think its a useful concept for readers to learn about as they are
> setting up their own workflows.
I do not have a particularly strong feeling about 'next' either way.

As the document states at the top, it lists ingredients from git.git management and it is left up to the readers to adopt parts that suit their needs, while not using others. In that spirit, the description of 'next' as "ahead of master that is supposed to be rock solid" may be a good thing to keep. It is orthogonal if the project wants to rewind and rebuild 'next' after every feature release---they do not need to (and we didn't do so for quite some time). One valid choice by readers is to adopt the concept of 'next' in their project but never rewind and rebuild it, and you made that clear that it is optional. So I think this part of your patch is good as-is.

Show 7 quoted lines
>> Other parts (except for the "branch -f" bit I've already told you
>> about in the other message) looked good.
>
> I'll add some discussion about the branch -f bit -- I hope you agree
> that in this document that is distributed with git, some
> beginner-level explanation of the difference between the branch -f and
> the merge approach is warranted?
Surely and thanks.
Raman Gupta· Mar 30, 2009, 18:40 UTC · re: Junio C Hamano · lore

Re: [PATCH 2/2] Add feature release instructions to gitworkflows man page

Junio C Hamano wrote:
Show 21 quoted lines
> Raman Gupta <rocketraman@fastmail.fm> writes:
> 
>> Junio C Hamano wrote:
>> ...
>> If you wish to remove discussion of 'next' from this document, that is
>> probably better done in a separate followup change. Though personally
>> I think its a useful concept for readers to learn about as they are
>> setting up their own workflows.
> 
> I do not have a particularly strong feeling about 'next' either way.
> 
> As the document states at the top, it lists ingredients from git.git
> management and it is left up to the readers to adopt parts that suit their
> needs, while not using others.  In that spirit, the description of 'next'
> as "ahead of master that is supposed to be rock solid" may be a good thing
> to keep.  It is orthogonal if the project wants to rewind and rebuild
> 'next' after every feature release---they do not need to (and we didn't do
> so for quite some time).  One valid choice by readers is to adopt the
> concept of 'next' in their project but never rewind and rebuild it, and
> you made that clear that it is optional.  So I think this part of your
> patch is good as-is.

It might be useful to add some explanation of why one would want to rewind and rebuild vs simply continue as is.

I guess the advantage is that the history for next starts out nice and clean for the next release, without any cruft from repeated merging of topic branches.

The disadvantage is that one must publish the operation and all forks must deal with the rebase.

Any other thoughts?

Cheers, Raman

Junio C Hamano· Apr 1, 2009, 16:15 UTC · re: Raman Gupta · lore

Re: [PATCH 2/2] Add feature release instructions to gitworkflows man page

Raman Gupta <rocketraman@fastmail.fm> writes:
Show 6 quoted lines
> It might be useful to add some explanation of why one would want to
> rewind and rebuild vs simply continue as is.
>
> I guess the advantage is that the history for next starts out nice and
> clean for the next release, without any cruft from repeated merging of
> topic branches.

Repeated merges are usually not a major issue. Summarization tools such as log and shortlog can be told not to list merges.

What matters more is a revert of a topic, that looked promising when it started, but later found undesirable or premature. In such a case, the topic is reverted out of 'next' and but the fact remains in the history that it was once merged, and it was reverted. We would want to get rid of these records at some point to give a chance for another incarnation of the topic done right a clean slate to retry, and a feature release is a good point in history to do so.

> The disadvantage is that one must publish the operation and all forks
> must deal with the rebase.
Yes.
Junio C Hamano· Mar 30, 2009, 06:56 UTC · re: rocketraman@fastmail.fm · lore

Re: [PATCH 1/2] Add feature release instructions to MaintNotes addendum

rocketraman@fastmail.fm writes:
> + - The 'maint' branch is updated to the new release.
> +
> +     $ git branch -f maint master

It appears that you are trying to make this document into a canned set of insns for people who want a ready-to-cut-and-paste-without-thinking recipe, and I am perfectly fine with such a document, but as I mentioned already, "how to maintain git" is not a good place to do so. You seem to have taken it as a joke, but I am serious.

In any case, I highly doubt we would want to have this "branch -f" here. Not in "how to maintain git", but especially in a document you would give to people who do not like to think for themselves but would want to follow cut-and-paste recipe.

_I_ can do the above, but that is _only_ because I maintain 'master' with certain discipline---it almost always is a superset of maint (it sometimes isn't---when I am too tired to do so late at night and the leftover fix on the 'maint' unmerged to 'master' is really trivial and unimportant in the grand scheme of things), and especially after a big release it always is.

But for people who want to use a ready-to-cut-and-paste-without-thinking recipe, it is much better to use:

	$ git checkout maint
	$ git merge master

just in case they have leftover fixes that later need to get merged to master. Otherwise they will be discarding the fixes with "branch -f".

An obvious alternative is to firmly describe in the release workflow to make sure that 'maint' is fully merged to 'master' before a release is made, but people tend to cherry-pick the parts they want to use without thinking things through when presented a cut-and-paste recipe, and in practice I do not think such an alternative would work well.

More important bits of release checklist, a bit outdated, is found in Checklist.txt file on the 'todo' branch.

I would need to talk a bit more about how to maintain What's in/cooking, how the automated maintenance of html/man branches work, and how to set up RPM building infrastructure for use with Meta/DoKernelOrg, in order to make the Documentation/howto/maintain-git.txt truly to be usable by somebody capable to take over when I cease to function as the maintainer here.

Raman Gupta· Mar 30, 2009, 17:57 UTC · re: Junio C Hamano · lore

Re: [PATCH 1/2] Add feature release instructions to MaintNotes addendum

Junio C Hamano wrote:
Show 11 quoted lines
> rocketraman@fastmail.fm writes:
> 
>> + - The 'maint' branch is updated to the new release.
>> +
>> +     $ git branch -f maint master
> 
> It appears that you are trying to make this document into a canned set of
> insns for people who want a ready-to-cut-and-paste-without-thinking
> recipe, and I am perfectly fine with such a document, but as I mentioned
> already, "how to maintain git" is not a good place to do so.  You seem to
> have taken it as a joke, but I am serious.
I guess the smiley face when you said that threw me off :)

Based on your feedback, I'll withdraw my patch for MaintNotes -- my intention in patching it was to provide more information for newbies or people reading it out of curiosity, however you're absolutely right -- it is not the right place for that type of information.

It does need more info in some of the other areas you mentioned and I would love to help but I'm not knowledgeable enough to do so and I fear I'll be more of a hindrance than a help.

Cheers, Raman

← back to recent threads