OpEntry

One applied operation.

Usage

Source

OpEntry(
    id,
    at,
    command,
    plan=None,
    result=dict(),
    pre=dict(),
    undoes=None,
    undone_by=None,
    status="done",
    parent=None,
    progress=list()
)

Attributes

id: str

12-hex identifier (tether undo ID).

at: str

When it was applied (UTC, ISO 8601).

command: str

commit, new, fork, gc, promote, import, add, remove, repair, or undo.

plan: dict[str, Any] | None

The Plan that was applied, as a dict (None for direct ops).

result: dict[str, Any]

What happened: pins created, branches forked, the VCS commit, the report – whatever the command produced.

pre: dict[str, Any]

What undo needs to reverse it: workspace state before, VCS position before, branch heads before they were reset, manifests before they were rewritten.

undoes: str | None

For an undo entry, the id of the operation it reversed.

undone_by: str | None

Set on an entry once an undo has reversed it.

status: str

"started" while the operation runs – the entry is appended (and synced) before the first side effect, with the plan and what undo would need – and "done" once a completion mark with the result follows. An entry still "started" in a log nobody is writing to is an operation that was interrupted: ops flags it, undo refuses it (what happened is not known), repair names it.

parent: str | None
The id of the operation this one is a step of (drop leaves the bookmark with a new and sweeps with a gc, each journaled). A step is undone with its parent or not at all: undo refuses it on its own, so half of a drop cannot come back.