Skip to main content
Mounted filesystems expose change controls under fs.change.

fs.change.new()

Create and switch to a new change from a bookmark or existing change.
string
required
Repository name.
string | undefined
Bookmark to fork from. Mutually exclusive with changeId.
string | undefined
Change ID to fork from. Mutually exclusive with bookmark.
string | undefined
Description for the new change. Omit to create the change with no description; pass "" explicitly for an empty description.

fs.change.edit()

Switch to an existing editable change. This never creates a new change.
string
required
Repository name.
string | undefined
Bookmark whose existing change should be edited. Mutually exclusive with changeId.
string | undefined
Existing change ID to edit. Mutually exclusive with bookmark.

fs.change.list()

List changes reachable from the current checkout’s commit.
string
required
Repository name.
number | undefined
Maximum number of changes to return. Defaults to 50. Pass 0 for no limit.

fs.change.current()

Return the currently active change for a repo.
string
required
Repository name.

Response types

string
Hex-encoded change OID of the now-active change.
string
Hex-encoded change ID.
string
Hex-encoded commit OID the change currently points to.

Errors

Change operations reject with MesaTransientError, MesaBadInputError, or MesaFatalError, all extending MesaFileSystemError. fs.change.checkpoint() rejects with MesaBadInputError when the current checkout is not on a bookmark and with MesaTransientError when another client moved the bookmark mid-checkpoint. Use instanceof to handle the category. See Error model.