Subversion Mirror

From: Warner Losh <imp_at_bsdimp.com>
Date: Thu, 21 Oct 2021 23:19:00 UTC
Greetings,

This email documents two recent events with the git -> subversion mirror.
This seems like the best way to document these two issues given their
esoteric nature.

We stopped mirroring stable/12 about a week ago. The root cause of this
outage was traced to there being an empty commit that was merged. This
caused the git cherry-pick that we do to bring these into the git-svn tree
that we use to publish to subversion to fail. The code has been updated to
handle these commits in the future. In the future, empty commits will
simply be skipped. Kyle did these commits to record a commit/backout pair
had been 'merged' so that they stopped showing up in the tools as merge
candidates. Since this metadata exists only in the git world, dropping them
in the subversion world is fine (we've stopped updating mergeinfo data for
stable/12).

The second incident was when the BETA1 builds were delayed by 23 hours.
This was due to the creation of the releng/12.3 branch in git. This is our
first new releng branch since we started mirroring to svn and the process
was not documented by the author of the git to subversion script (namely
me). It took me a while to understand why simply creating the branch was
insufficient and to realize the proper path forward.

The proper sequence of events is to create new releng/12.x branch from the
branch point by hand in subversion. All these things should be done as user
git2svn:

% svn copy file:///home/svn/base/stable/12@r370949
file:///home/svn/base/releng/12.3 -m 'Create releng/12.3'

where r370949 was the point in subversion where releng/12.3 was branched.
Once this branch was created, the 'git-svn' pump needed to be primed. The
releng123 branch needed to be added to ~git2svn/git2svn.conf file (and but
not to the list of branches= yet):

# releng/12.3 config
releng123_name="releng/12.3"
releng123_path=/home/git/freebsd-src-releng-12.3

Once that was done, we needed to initialize the git2svn tree that lives on
git2svn.freebsd.org, as the user git2svn:

% ./gsm2 -b releng123 branch-init

which will create the necessary git-svn tree for the crontab's 'gsm2
mirror' command to work. Once the branch has been initialized, releng123
should be added to the branches= so that commits start to flow.

These issues have been corrected, so the git -> svn mirror hopefully will
go back to being a background process that just works. One could argue this
should be automated. I've chosen not to automated it because it's a lot
more effort to do that than to document the process should we have a
12.4-RELEASE in the future (and its associated releng/12.4).

Finally, we're still mirroring the 11.x branches. This will stop at some
point in the future, though, most likely the next time the mirroring of
11.x breaks :).

Warner