oplog.OpEntry
One applied operation.
Usage
oplog.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, orundo. plan: dict[str, Any] | None-
The Plan that was applied, as a dict (
Nonefor 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
undoneeds 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
undoentry, the id of the operation it reversed. undone_by: str | None-
Set on an entry once an
undohas reversed it. status: str-
"started"while the operation runs – the entry is appended (and synced) before the first side effect, with the plan and whatundowould 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:opsflags it,undorefuses it (what happened is not known),repairnames it. parent: str | None-
The id of the operation this one is a step of (
dropleaves the bookmark with a new and sweeps with agc, each journaled). A step is undone with its parent or not at all:undorefuses it on its own, so half of a drop cannot come back.
Attributes
| Name | Description |
|---|---|
| NOT_UNDOABLE |
Commands undo cannot reverse: their effects are the VCS’s to take
|
| incomplete | The operation began but no completion mark followed. |
| undoable | Not itself an undo, not already undone, complete, not a step of |
NOT_UNDOABLE
Commands undo cannot reverse: their effects are the VCS’s to take
NOT_UNDOABLE=frozenset({"undo", "repair", "upgrade", "abandon", "drop", "forget-workspace"})
back, or were irreversible to begin with.
incomplete
The operation began but no completion mark followed.
incomplete: bool
undoable
Not itself an undo, not already undone, complete, not a step of
undoable: bool
another operation, and of a reversible kind.
Methods
| Name | Description |
|---|---|
| summary() |
One line for tether ops.
|
summary()
One line for tether ops.
Usage
summary()