Topic
The members
Each member of the history, with what it does:
| Member | Does |
|---|---|
record(project, { by, kind, name, checked, description, note }) | Records the files as they are as one point on the point that now stands on, and moves now to it. A save that is made within historyJoin of the save that is its parent takes that point's place, where no other pointer names the older one. A point of any other kind is never joined |
mark(point, { checked, description, note }) | Writes what this computer found of a point. Its id stays |
read(id), blob(fingerprint) | A point by its id, and the bytes of a file by their fingerprint. Nothing where the history holds none |
find(word) | The point that a word names: now, a pointer, the newest point of that name, or the one point whose id starts with the word, where the word is 8 or more characters of an id, tried in that order |
list({ pointer, kinds, newest }) | The points along the first parents, newest first, from now or from another pointer |
pointer(name), move(name, to), pointers() | What a pointer holds, a pointer set, and all of them. now is where the project stands, and on holds the name of the branch that now follows |
compare(a, b) | The changes from one point to another, in the terms of the app, each as { change, what, name, was, path, from, to, lines }: the two descriptions that were kept with the points are compared definition by definition, and the files that hold no definition file by file. A point that did not build is compared file by file. lineOf(change) of tentjs/history answers the line that tent history compare prints for one |
back(project, point, by) | Records the present as a point of the kind command, writes each file of the named point that differs, removes each file that the present holds and the named point does not, and records a point of the kind back on the present. So going back can itself be undone, and a file that no point holds is never touched. Where a file of the named point would be written over one that no point holds, as one that leave names or that grew past historyFileSize, or through a link, it throws T0013, which names each such file, before anything is recorded or written |
have({ points, blobs }), take({ blobs, points }) | Which of the named points and blobs are here, and what another history sends, stored in one write. Every fingerprint and every id is checked, a point is taken once its parents are here, a path that leads into .tent/ or into .git in any case of its name is refused, and a point that came by take holds no checked |
branch(name, from) | Makes a branch at the point that from names, now where none is named, and keeps the point it was made at, which is never dropped. A history follows main from the first time it knows of a branch. A name holds no colon and no white space, and is not now, on or live: T0002 for another, and for one that names a branch already |
switch(project, name, by) | Records the present where no point holds it yet, writes the files of the branch's point as back does, and sets on to the branch. It answers that point, and throws T9107 for a branch that is not there |
merge(project, from, by, { dry }) | Merges the point or the branch that from names into the files, by the newest point the two share, and answers { point, changes, clashes }. What only one side changed is taken from it; a plain definition that both changed merges field by field and is written anew at its place with definitionSource; a body merges step by step; code and a file that holds no definition merge line by line. A clash leaves ours, writes tent.clash.ts, keeps a file of bytes of theirs beside ours as <path>.theirs, and marks the point of the kind merge, whose parents are ours and theirs, unsettled, with the clashes as data. Where ours is the point the two share, the merge is their point itself. With dry it changes nothing. T9101 for a side that is unsettled |
settle(project, by) | Records the settled point of a merge with clashes, as a point of the kind merge after it. T9102 while tent.clash.ts or a .theirs file is there |
write(point, folder) | The files of a point, written into a folder |
tidy(now, { kept }) | Drops each point of the kinds save and command that is older than kept milliseconds, but for one that a pointer stands on and the newest point that two branches share. A dropped point keeps its row, with its id and its parents, and loses its files, its description and its note. Then each blob that no point names is removed. It answers { points, blobs } |
exportGit(folder, { kinds }) | Writes the named, the published and the merge points along now as commits into a folder, oldest first, with the git program of the computer: the name or the kind as the message, the writer as the author. The folder is empty, or holds what an earlier export wrote, to which the points that came after its newest one are added |
find takes a word wherever a member names a point, but for read, which takes an id.