Skip to content

Commit 8ad5632

Browse files
committed
Merge branch 'jc/how-to-maintain-updates' (early part) into maint-2.46
* 'jc/how-to-maintain-updates' (early part): howto-maintain: update daily tasks howto-maintain: cover a whole development cycle
2 parents cb9c47c + bb0498b commit 8ad5632

File tree

1 file changed

+105
-53
lines changed

1 file changed

+105
-53
lines changed

Documentation/howto/maintain-git.txt

Lines changed: 105 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -37,22 +37,20 @@ The Policy
3737

3838
The policy on Integration is informally mentioned in "A Note
3939
from the maintainer" message, which is periodically posted to
40-
this mailing list after each feature release is made.
40+
the mailing list after each feature release is made:
4141

4242
- Feature releases are numbered as vX.Y.0 and are meant to
4343
contain bugfixes and enhancements in any area, including
4444
functionality, performance and usability, without regression.
4545

46-
- One release cycle for a feature release is expected to last for
47-
eight to ten weeks.
48-
49-
- Maintenance releases are numbered as vX.Y.Z and are meant
46+
- Maintenance releases are numbered as vX.Y.Z (0 < Z) and are meant
5047
to contain only bugfixes for the corresponding vX.Y.0 feature
5148
release and earlier maintenance releases vX.Y.W (W < Z).
5249

53-
- 'master' branch is used to prepare for the next feature
50+
- The 'master' branch is used to prepare for the next feature
5451
release. In other words, at some point, the tip of 'master'
55-
branch is tagged with vX.Y.0.
52+
branch is tagged as vX.(Y+1).0, when vX.Y.0 is the latest
53+
feature release.
5654

5755
- 'maint' branch is used to prepare for the next maintenance
5856
release. After the feature release vX.Y.0 is made, the tip
@@ -63,11 +61,13 @@ this mailing list after each feature release is made.
6361
- 'next' branch is used to publish changes (both enhancements
6462
and fixes) that (1) have worthwhile goal, (2) are in a fairly
6563
good shape suitable for everyday use, (3) but have not yet
66-
demonstrated to be regression free. New changes are tested
67-
in 'next' before merged to 'master'.
64+
demonstrated to be regression free. Reviews from contributors on
65+
the mailing list help to make the determination. After a topic
66+
is merged to 'next', it is tested for at least 7 calendar days
67+
before getting merged to 'master'.
6868

6969
- 'seen' branch is used to publish other proposed changes that do
70-
not yet pass the criteria set for 'next'.
70+
not yet pass the criteria set for 'next' (see above).
7171

7272
- The tips of 'master' and 'maint' branches will not be rewound to
7373
allow people to build their own customization on top of them.
@@ -86,6 +86,38 @@ this mailing list after each feature release is made.
8686
users are encouraged to test it so that regressions and bugs
8787
are found before new topics are merged to 'master'.
8888

89+
- When a problem is found in a topic in 'next', the topic is marked
90+
not to be merged to 'master'. Follow-up patches are discussed on
91+
the mailing list and applied to the topic after being reviewed and
92+
then the topic is merged (again) to 'next'. After going through
93+
the usual testing in 'next', the entire (fixed) topic is merged
94+
to 'master'.
95+
96+
- One release cycle for a feature release is expected to last for
97+
eight to ten weeks. A few "release candidate" releases are
98+
expected to be tagged about a week apart before the final
99+
release, and a "preview" release is tagged about a week before
100+
the first release candidate gets tagged.
101+
102+
- After the preview release is tagged, topics that were well
103+
reviewed may be merged to 'master' before spending the usual 7
104+
calendar days in 'next', with the expectation that any bugs in
105+
them can be caught and fixed in the release candidates before
106+
the final release.
107+
108+
- After the first release candidate is tagged, the contributors are
109+
strongly encouraged to focus on finding and fixing new regressions
110+
introduced during the cycle, over addressing old bugs and any new
111+
features. Topics stop getting merged down from 'next' to 'master',
112+
and new topics stop getting merged to 'next'. Unless they are fixes
113+
to new regressions in the cycle, that is.
114+
115+
- Soon after a feature release is made, the tip of 'maint' gets
116+
fast-forwarded to point at the release. Topics that have been
117+
kept in 'next' are merged down to 'master' and a new development
118+
cycle starts.
119+
120+
89121
Note that before v1.9.0 release, the version numbers used to be
90122
structured slightly differently. vX.Y.Z were feature releases while
91123
vX.Y.Z.W were maintenance releases for vX.Y.Z.
@@ -179,12 +211,12 @@ by doing the following:
179211
The initial round is done with:
180212

181213
$ git checkout ai/topic ;# or "git checkout -b ai/topic master"
182-
$ git am -sc3 mailbox
214+
$ git am -sc3 --whitespace=warn mailbox
183215

184216
and replacing an existing topic with subsequent round is done with:
185217

186218
$ git checkout master...ai/topic ;# try to reapply to the same base
187-
$ git am -sc3 mailbox
219+
$ git am -sc3 --whitespace=warn mailbox
188220

189221
to prepare the new round on a detached HEAD, and then
190222

@@ -209,39 +241,59 @@ by doing the following:
209241
(trivial typofixes etc. are often squashed directly into the
210242
patches that need fixing, without being applied as a separate
211243
"SQUASH???" commit), so that they can be removed easily as needed.
244+
The expectation is that the original author will make corrections
245+
in a reroll.
212246

247+
- By now, new topic branches are created and existing topic
248+
branches are updated. The integration branches 'next', 'jch',
249+
and 'seen' need to be updated to contain them.
213250

214-
- Merge maint to master as needed:
251+
- If there are topics that have been merged to 'master' and should
252+
be merged to 'maint', merge them to 'maint', and update the
253+
release notes to the next maintenance release.
215254

216-
$ git checkout master
217-
$ git merge maint
218-
$ make test
255+
- Review the latest issue of "What's cooking" again. Are topics
256+
that have been sufficiently long in 'next' ready to be merged to
257+
'master'? Are topics we saw earlier and are in 'seen' now got
258+
positive reviews and are ready to be merged to 'next'?
219259

220-
- Merge master to next as needed:
260+
- If there are topics that have been cooking in 'next' long enough
261+
and should be merged to 'master', merge them to 'master', and
262+
update the release notes to the next feature release.
221263

222-
$ git checkout next
223-
$ git merge master
224-
$ make test
264+
- If there were patches directly made on 'maint', merge 'maint' to
265+
'master'; make sure that the result is what you want.
225266

226-
- Review the last issue of "What's cooking" again and see if topics
227-
that are ready to be merged to 'next' are still in good shape
228-
(e.g. has there any new issue identified on the list with the
229-
series?)
267+
$ git checkout master
268+
$ git merge -m "Sync with 'maint'" --no-log maint
269+
$ git log -p --first-parent ORIG_HEAD..
270+
$ make test
230271

231-
- Prepare 'jch' branch, which is used to represent somewhere
232-
between 'master' and 'seen' and often is slightly ahead of 'next'.
272+
- Prepare to update the 'jch' branch, which is used to represent
273+
somewhere between 'master' and 'seen' and often is slightly ahead
274+
of 'next', and the 'seen' branch, which is used to hold the rest.
233275

234276
$ Meta/Reintegrate master..jch >Meta/redo-jch.sh
235277

236278
The result is a script that lists topics to be merged in order to
237-
rebuild 'seen' as the input to Meta/Reintegrate script. Remove
238-
later topics that should not be in 'jch' yet. Add a line that
239-
consists of '### match next' before the name of the first topic
240-
in the output that should be in 'jch' but not in 'next' yet.
279+
rebuild the current 'jch'. Do the same for 'seen'.
280+
281+
- Review the Meta/redo-jch.sh and Meta/redo-seen.sh scripts. The
282+
former should have a line '### match next'---the idea is that
283+
merging the topics listed before the line on top of 'master'
284+
should result in a tree identical to that of 'next'.
241285

242-
- Now we are ready to start merging topics to 'next'. For each
243-
branch whose tip is not merged to 'next', one of three things can
244-
happen:
286+
- As newly created topics are usually merged near the tip of
287+
'seen', add them to the end of the Meta/redo-seen.sh script.
288+
Among the topics that were in 'seen', there may be ones that
289+
are not quite ready for 'next' but are getting there. Move
290+
them from Meta/redo-seen.sh to the end of Meta/redo-jch.sh.
291+
The expectation is that you'd use 'jch' as your daily driver
292+
as the first guinea pig, so you should choose carefully.
293+
294+
- Now we are ready to start rebuilding 'jch' and merging topics to
295+
'next'. For each branch whose tip is not merged to 'next', one
296+
of three things can happen:
245297

246298
- The commits are all next-worthy; merge the topic to next;
247299
- The new parts are of mixed quality, but earlier ones are
@@ -252,10 +304,12 @@ by doing the following:
252304
If a topic that was already in 'next' gained a patch, the script
253305
would list it as "ai/topic~1". To include the new patch to the
254306
updated 'next', drop the "~1" part; to keep it excluded, do not
255-
touch the line. If a topic that was not in 'next' should be
256-
merged to 'next', add it at the end of the list. Then:
307+
touch the line.
308+
309+
If a topic that was not in 'next' should be merged to 'next', add
310+
it before the '### match next' line. Then:
257311

258-
$ git checkout -B jch master
312+
$ git checkout --detach master
259313
$ sh Meta/redo-jch.sh -c1
260314

261315
to rebuild the 'jch' branch from scratch. "-c1" tells the script
@@ -267,26 +321,29 @@ by doing the following:
267321
reference to the variable under its old name), in which case
268322
prepare an appropriate merge-fix first (see appendix), and
269323
rebuild the 'jch' branch from scratch, starting at the tip of
270-
'master'.
324+
'master', this time without using "-c1" to merge all topics.
271325

272-
Then do the same to 'next'
326+
Then do the same to 'next'.
273327

274328
$ git checkout next
275329
$ sh Meta/redo-jch.sh -c1 -e
276330

277331
The "-e" option allows the merge message that comes from the
278332
history of the topic and the comments in the "What's cooking" to
279-
be edited. The resulting tree should match 'jch' as the same set
280-
of topics are merged on 'master'; otherwise there is a mismerge.
281-
Investigate why and do not proceed until the mismerge is found
282-
and rectified.
333+
be edited. The resulting tree should match 'jch^{/^### match next'}'
334+
as the same set of topics are merged on 'master'; otherwise there
335+
is a mismerge. Investigate why and do not proceed until the mismerge
336+
is found and rectified.
337+
338+
If 'master' was updated before you started redoing 'next', then
283339

284-
$ git diff jch next
340+
$ git diff 'jch^{/^### match next}' next
285341

286-
Then build the rest of 'jch':
342+
would show differences that went into 'master' (which 'jch' has,
343+
but 'next' does not yet---often it is updates to the release
344+
notes). Merge 'master' back to 'next' if that is the case.
287345

288-
$ git checkout jch
289-
$ sh Meta/redo-jch.sh
346+
$ git merge -m "Sync with 'master'" --no-log master
290347

291348
When all is well, clean up the redo-jch.sh script with
292349

@@ -296,12 +353,7 @@ by doing the following:
296353
merged to 'master'. This may lose '### match next' marker;
297354
add it again to the appropriate place when it happens.
298355

299-
- Rebuild 'seen'.
300-
301-
$ Meta/Reintegrate jch..seen >Meta/redo-seen.sh
302-
303-
Edit the result by adding new topics that are not still in 'seen'
304-
in the script. Then
356+
- Rebuild 'seen' on top of 'jch'.
305357

306358
$ git checkout -B seen jch
307359
$ sh Meta/redo-seen.sh
@@ -312,7 +364,7 @@ by doing the following:
312364

313365
Double check by running
314366

315-
$ git branch --no-merged seen
367+
$ git branch --no-merged seen '??/*'
316368

317369
to see there is no unexpected leftover topics.
318370

0 commit comments

Comments
 (0)