The new-read branch appears to work well enough for now. See the notes below.
Please do test this branch, using due caution. In particular, I strongly recommend that: 1. You test only with files under git control. 2. You back up any .leo files you use that are not under git control. In the end, the new code is quite similar to the old. There are no grand changes, just lots of very tricky tweaks to existing code. I am relying on the usual suspects to work with this new branch. Please report any problems or unexpected behavior immediately. *Notes* 1. After many experiments, the new code *does* create recovered nodes for *all *changed nodes, *including* non-cloned nodes that are descendants of cloned nodes. Creating recovered nodes for all changed nodes is something new and imo justifies retaining recovered nodes. 2. I am not sure there is a way to create an out-of-sync *warning* (the rare case). The code involve is in cacher.reportIfNodeChanged. I have spent many hours tweaking and testing this method. I believe it is sound. More than that, it is robust and maximally informative. 3. Here are the two main test strategies I used: Strategy 1: - Switch between branches, *both *of which contain the new code. - Recovered nodes may be generated, but Shift-Ctrl-W (write-at-file-nodes) should write NO nodes. Strategy 2: - Open two copies of leoPy.leo (in a branch containing the new code). - Change a node in one leoPy.leo. - Change to the other leoPy.leo. - Say "yes" when asked whether you want to update. You should get a recovered node. 4. I plan no further work on this project except for cleaning up by removing the g.new_read switch. 5. I would like to merge the new-read branch into master yesterday, but I think a week of testing would be wise. To get the benefits of the new code in a "working" branch, you might do this: - From master, create the working branch. - From the working branch, do git merge new-read. - Do the work in the working branch. - Last, cherry pick the changes after merging new-read. Or something like that :-) All comments welcome. Edward -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
