We used to (and we still may) depend on the new-workdir layout where
we could force checkout the same branch in the buildfarm directory.
Let's migrate it to use the officially supported worktree feature,
but be on detached HEADs. Teach METAMAKEBRANCH environment variable
to Meta/Make, so that even a build on a detached HEAD can be told
for which branch it is building and installing. Use the variable in
Meta/Dothem and adjust the script minimally.
So far, once the trees are set up, updating to newer revision and
building seem to work OK. Nothing is done for bootstrapping part,
but this should do for now.
The script has 'comm' compare two 'git branch --list' output, which
is strictly ASCII/lexicographic order. In en_US locale, for example,
the 'git branch --list' output order may not look sorted, e.g.
'pack-objects' may sort before or after 'packfile'.
When the blurb pattern finds no match, the program only said that it
does not match and died. It would be very hard to make it report
that this and that token in the blurb text is misspelt and it would
match the pattern when that typo gets fixed, but at least it should
be able to dump the haystack it was looking for needles in to let
the human user do the guessing.
While waiting for build and test of the current round of
integration, we should be able to prepare the next round while on
a detached HEAD. By running
$ git co --detach master
$ INTO=jch Meta/redo-jch.sh
we can prepare a sequence of "Merge branch 'foo' into jch" commits
that can be used to replace 'jch' that is currently being tested,
without disrupting the test.
Before diving into inspecting each merge commit to see if it merges
more than two topics at the same time, we can count the number of
branches that are merged and the number of merge commits. If they
match, we can skip the more expensive check.
This will break if we merge a topic in multiple steps, but we do not
do that these days, so it would be a reasonable optimization.