Skip to main content

Module sync

Module sync 

Source
Expand description

Push, pull and status for every configured remote alike (SPEC 9.6 to 9.9), shared by the CLI and the app.

Each push and pull is recorded per remote in the machine-local state/remote-status.toml (time, head pushed, last error), so the History page and Settings can show ahead N, behind N and the last error without reaching the remote (SPEC 9.8). status reads that record and, for a folder remote, the folder itself: this machine’s machine.json (what was pushed) and the siblings’ heads (what there is to pull). It never fetches from a git remote: behind comes from the last fetch.

Structs§

RecordedError
The error recorded for a remote’s last push or pull.
RemoteRecord
One remote’s record.
RemoteStatus
A remote as Settings and History show it.
StatusFile
state/remote-status.toml.
SyncEnv
What pushes and pulls run with.

Enums§

Pushed
What one push did.

Constants§

STATUS_FILE
The record file in state/.

Functions§

changed_by_pull
Servers and skills a pull changed (SPEC 9.9 step 6).
pull_from
Pulls from the selected remotes and merges (SPEC 9.9); one result per remote, each recorded. progress as for push_to.
push_to
Pushes to the selected remotes (every remote when name is None); one result per remote, each recorded. progress gets git’s progress lines with the remote’s name.
status
The status of remote, without contacting a git remote. store is None before the store exists.

Type Aliases§

PullResult
One pull: the remote’s name and how it went.
PushResult
One push: the remote’s name and how it went.