fetchArriving
uses tcmts.cli.sync.historyArriving, which uses process
Fetch what's arriving of pulled heads' history (#zo42gmey), in this process, until nothing is: each
head's earlier entries with what they name, and its remote's releases (which name history). say hears how it's
going.
import type { Codebase } from "#codebase/tcmts/cli/codebase"; import { fetchHistory, fetchReleases, historyArriving, openRemote } from "#codebase/tcmts/cli/sync"; export async function fetchArriving(cb: Codebase, say?: (line: string) => void) { for (let left = historyArriving(cb).entries; left.length; left = historyArriving(cb).entries) for (const a of left) { const { remote } = openRemote(cb, a.remote); await fetchHistory(cb, remote, a.head, { say }); await fetchReleases(cb, remote); cb.store.deleteSetting(`history.arriving.${a.head}`); } }
uses
- tcmts.cli.codebase.Codebase
- tcmts.cli.sync.fetchHistory
- tcmts.cli.sync.fetchReleases
- tcmts.cli.sync.historyArriving
- tcmts.cli.sync.openRemote