Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commite8beb5604c

README.md

world_vcs.vcsWire

The wire helper every __spacetime_vcs.* caller shares, and the readers of the answers a read or a publish gives back.

  • awaitVcs(promise) waits for one of the __spacetime_vcs.* promises and answers true, payload, or false, message for an ERR: payload.
  • clarifyVcsError(message) restates the backend errors that read as something other than what happened: a live connection still establishing, a session not yet authorized, and a staging area another caller committed away.
  • readVcs(promise, what) answers the payload of a read, raising with what and the backend's reason when the read could not be answered.
  • readContentOrAbsent(promise, what, absent) answers a per-path content read's bytes, nil when the backend answered absent (ABSENT_STAGED, ABSENT_AT_COMMIT), and raises with what for every other reason.
  • isAlreadyPublished(message) and alreadyPublishedId(message) read a publish's answer that the remote already carries what it would publish, and the ZeroMind commit id it names.
local vcsWire = require("modules.world_vcs.vcsWire")
local ok, payload = vcsWire.awaitVcs(__spacetime_vcs.status("", "", "default"))