tcmts.cli.changes

Types

BranchItem type
A branch, for the editor: whether it's this one, how many names differ from this one's, and when it last changed.
HistoryItem type
A history entry, for the editor: `back` is how many entries back it is on its branch (what `tcm reset` takes).
NameChange type
A name that changed, as `tcm diff` sorts it: its code edited, re-hashed only because what it uses changed (`because`), added, removed, renamed (`from`), given another name (`existing`), or conflicted. `old` and `hash` are the hashes before and after, `oldUri` and `uri` their documents (a file has none: it opens as a page).
NamesFrom type
Whose names a definition's document reads with: a history entry's (`at`), a branch's, or (neither) this branch's.

Shared

branchChanges (cb: Codebase, branch: string, viewUri: (hash: string, names: NamesFrom) => string) => NameChange[]
What another branch has that this one doesn't, name by name: the changes from this branch to it.
branchList (cb: Codebase) => BranchItem[]
The codebase's branches, this one first.
entryChanges (cb: Codebase, hash: string, viewUri: (hash: string, names: NamesFrom) => string) => NameChange[]
What a history entry changed (from the entry before it on its branch).
historyList (cb: Codebase, limit?: number, branch?: string | undefined) => HistoryItem[]
A branch's latest history entries, newest first (this branch's, unless one is named), as `tcm history` lists them.
namesChanged (cb: Codebase, before: NameState, after: NameState, viewUri: (hash: string, side: "after" | "before…
What changed from one state of the names to another, name by name.
namesFrom (cb: Codebase, from: NamesFrom) => (hash: string) => string | undefined
The names a history entry or branch gives definitions: a definition's first name there.
stateAt (cb: Codebase, causal: string) => NameState
The names as of a history entry.