cctest-recipe-upstream: derive upstream base branch (mirror main vs upstream master)

This commit is contained in:
2026-09-14 19:19:45 +00:00
parent 1b8c3966cb
commit 43f2cf074b
2 changed files with 16 additions and 2 deletions
@@ -80,4 +80,11 @@ one upgrade commit. Guard: while preparing, run
`git merge-base <head_ref> <base_ref>`; if the result is older than a few commits below upstream
`origin/main`, cherry-pick the upgrade commit(s) onto fresh upstream `origin/main` (branch
`<head_ref>-rebased`), push THAT to the autonomic mirror, and emit the fetch/push/compare commands
using the rebased branch instead of the raw one.
using the rebased branch instead of the raw one. Also fix the stale `origin/main` wording above:
the upstream base branch may be `master`, not `main` — derive it from the remotes.
**Branch-name mismatch mirror vs upstream.** The mirror and upstream can use different base-branch
names (gitea: mirror `main`, upstream `master`). When emitting step 3 (the post-merge release),
NEVER hardcode `main` — derive the upstream default branch from the existing remotes (`git
remote show origin` or `git ls-remote --symref origin HEAD`) and emit `git checkout <that>;
git fetch origin; git merge --ff-only origin/<that>;` before `abra recipe release`.
+8 -1
View File
@@ -108,7 +108,14 @@ one upgrade commit. Guard: while preparing, run
`git merge-base <head_ref> <base_ref>`; if the result is older than a few commits below upstream
`origin/main`, cherry-pick the upgrade commit(s) onto fresh upstream `origin/main` (branch
`<head_ref>-rebased`), push THAT to the autonomic mirror, and emit the fetch/push/compare commands
using the rebased branch instead of the raw one.
using the rebased branch instead of the raw one. Also fix the stale `origin/main` wording above:
the upstream base branch may be `master`, not `main` — derive it from the remotes.
**Branch-name mismatch mirror vs upstream.** The mirror and upstream can use different base-branch
names (gitea: mirror `main`, upstream `master`). When emitting step 3 (the post-merge release),
NEVER hardcode `main` — derive the upstream default branch from the existing remotes (`git
remote show origin` or `git ls-remote --symref origin HEAD`) and emit `git checkout <that>;
git fetch origin; git merge --ff-only origin/<that>;` before `abra recipe release`.
""",
}