gitoria
All repositories: gitoria
1.0 KB
// lib/forwards.hl — A MOVED REPO'S OLD ADDRESS (ticket gitoria#34, GO34). tools/move-repo.hl leaves a row per move:// forwardsTable pk @id index !oldName { oldName (the old full name), to (the new one), created } storage/mpackdb/forwards.db// The old address shows "moved to …" (a page cannot redirect: hl:web gap, .scratch/repro-redirect), and git over HTTP and SSH on// the old path is served from the new place (transport.hl, api.hl gitAccess).import { MPackDB } from 'hl:mpackdb'import { now } from 'hl:time'import { storageDir, firstOf } from './util.hl'static forwardsTable = new MPackDB(file = storageDir + '/forwards.db', primaryKey = '@id', indexes = ['!oldName'])static forwardOf = (name) => {if (name == null || hlTypeName(name) != 'String' || name == '') { return null }r = firstOf(forwardsTable.find('oldName', name))return r == null ? null : r.to}static putForward = (name, to) => {old = firstOf(forwardsTable.find('oldName', name))if (old != null) { forwardsTable.delete(old.id) }return forwardsTable.put({ oldName = name to = to created = now() }) != null}
Branches
- f1-broken-json
- f2-api-bugs
- gp-gate-ports
- heap-revert
- hl25-records
- ident-chooser-selector
- mainmain branch
- p51-public-pr-reads
- records-1112
- s25-no-session-on-login-error
- v59
- w52-person-approval
- w52b-approval-followup
- w52c-header-phone
- w53-pulls-speed-pr
- w54-repo-rename-pr
- w55-rename-org
- w56-owner-members
- w62-pr-close
- w63-force-push
- w64-org-slash
Latest commits
- 55c84779Merge branch 'gp-gate-ports' into mainGitoria
- 57af42bbREADME: point to deploy.sh for the port listmre
- d63375d2README: gate commands with explicit portsmre
- feeaa701|||PR gates: explicit ports only, deploy.sh passes themmre
- 6cc1f943Merge branch 'records-1112' into mainGitoria
- 9448c438|||PR records: LOG, missions and reports since 11-09mre
- 6dc08a8eMerge branch 'p51-public-pr-reads' into mainGitoria
- 7b88cfe0Type publicReaderOfRequest parameters (L10)Gitoria
- 2a4b3dc1|||PR Anonymous reads of public repos' pulls and statusesmre
- 21b2c141Merge branch 's25-no-session-on-login-error' into mainGitoria
- 698458e2|||PR No session for cookieless login errors: READMEmre
- cce7b785|||PR No session for cookieless login errorsmre
- 678d6303Merge branch 'v59' into mainGitoria
- 5803cf4f|||PR vendor: Hybriel set-day59 and GC budget 32 MiBmre
- 9eff6627Merge branch 'f2-api-bugs' into mainGitoria
- 26117255|||PR apps API: review comments on files with spaces in their namemre
- b8796cecMerge branch 'f1-broken-json' into mainGitoria
- 2f2959c5|||PR apps API: broken JSON body gives 400 invalid_json, not 500mre
- f7c6ca07Merge branch 'ident-chooser-selector' into mainGitoria
- 691abb8e|||PR tests: find ident identity choice without the removed .choose classmre