fn translate(
stores: &[Store],
older: &BTreeMap<String, (Option<String>, u64, String)>,
memory: &mut Memory,
winners: &BTreeMap<String, (Option<String>, u64, String)>,
modern: &BTreeSet<String>,
) -> (Vec<(String, Option<String>, u64, String)>, Vec<(String, String)>)Expand description
Format 1’s changes (older: by entry, the later of each), for the files
format 2 divides otherwise, in format 2’s names. Passed over: one at or
below what format 1 already said under that entry here (Floor). An
element’s change takes the name format 2 gives it: its own id; for a
session (named by its start, task and project) without one, the id of
the session of that name here (a device on format 1 writes a session
without the id the switch gave it here: the id is kept), else the id
derived from that name; for a money line, its id, else the id derived
from it. A value without its id takes the id it goes under, written into
it: what the switch wrote stays. From an older Sioul (modern: the
writers whose sealed entry says they read format 2; the others), a line’s
removal named by a version this device does not hold any more (a copy
changed since) is passed over; from a device that reads format 2 and
still writes format 1 for a few minutes, the later word wins. Several
entries for one element (an older Sioul changes a line by adding its new
version and taking the old one out) make one change: the latest version
held, at the latest clock; none held, taken out. A list sent whole sets
what it holds and takes out, of what the previous whole list held, what
it no longer holds, at its clock: never an element added since in format
2. Returns the changes, and the names that differ from what a device
holding none of them would give (a session whose own id was kept here,
its value carrying none): sent again from here in format 2, so that every
device, one joining later too, holds it under one name.