## oplog.OpEntry


One applied operation.


Usage

``` python
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](vcs.VcsAdapter.md#tether.vcs.VcsAdapter.commit), [new](vcs.VcsAdapter.md#tether.vcs.VcsAdapter.new), [fork](testing.ObjectBackend.md#tether.testing.ObjectBackend.fork), `gc`, [promote](testing.ObjectBackend.md#tether.testing.ObjectBackend.promote), `import`, [add](testing.ObjectDiff.md#tether.testing.ObjectDiff.add), `remove`, `repair`, or `undo`.

`plan: dict[str, Any] | None`  
The [Plan](Plan.md#tether.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](vcs.VcsAdapter.md#tether.vcs.VcsAdapter.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.


## Attributes

| Name | Description |
|----|----|
| [NOT_UNDOABLE](#NOT_UNDOABLE) | Commands `undo` cannot reverse: their effects are the VCS's to take |
| [incomplete](#incomplete) | The operation began but no completion mark followed. |
| [undoable](#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", `<span class="st">`"repair"``, ``"upgrade"``, ``"abandon"``, ``"drop"``, ``"forget-workspace"``})`</span>


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()](#summary) | One line for `tether ops`. |

------------------------------------------------------------------------


#### summary()


One line for `tether ops`.


Usage

``` python
summary()
```
