Documentation
¶
Overview ¶
Package migrate moves the state of the old flat layout (0.4 and before: <id>.txt, .<id>.state and so on, all in the state folder) into one folder per session. `sitrep setup` runs it after it has installed the program, and the user can run it with `sitrep migrate`. It is never called from a hook, and it is safe to run again and to stop at any point.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Result ¶
Result says what a run did, one line per file, and how many.
func Run ¶
Run moves every file of the old layout it finds. A file is moved by a hard link into the session's folder and removal of the old name, so nothing is ever overwritten (a rename would replace a file a new hook wrote a moment ago), the modification time that dates a state is kept, and a run that is stopped halfway is finished by the next one. A queue that exists in both places is merged, the old items first. Any other file whose destination exists stays where it is and is reported. The notes of a session move last, because a session exists only when its notes do: one that is moved in part is not listed in part. With dry nothing changes.