On Thursday, June 22, 2017 at 8:09:34 AM UTC-5, Edward K. Ream wrote:

> The *acid test* for switching branches is to ensure that after switching 
branches it's possible to do write-at-file-nodes on the top-level Code node 
without changing any external file.

This test now passes, but subtle complications remain, as I'll discuss next.

> It was straightforward to eliminate recovered nodes.

I am beginning to rethink this issue, for three reasons:

1. The new code now checks all *descendants* of cloned nodes for changes. 
As a result, the objection that the recovered-nodes messages apply only to 
clones no longer (necessarily) applies.

2. Perhaps more importantly, I now see that .leo files are like global 
variables. That is, the contents of a .leo file *remains the same* when 
switching branches (unless git is tracking the .leo file itself, which is 
*not* true of leoPy.leo, but *is* true of LeoPyRef.leo).

So clones that appear in leoPy.leo but outside an @<file> node could create 
recovered nodes. Now that the new code will report changed *descendants* of 
such clones, it *might* be useful to create recovered nodes.  But git 
already reports the diffs between branches, so perhaps there should be a 
user option that determines whether Leo will report these *common *cases of 
recovered nodes.

3. There is also a *rare *case is when two *different* external files 
contain out-of-sync copies of the same node (nodes with the same gnx). You 
have to work to make clones in different external files get out of sync in 
Leo, but it's possible. Nodes in different external files can also get out 
of sync if a user changes a node in one external file outside Leo, without 
changing the corresponding node in the other external file.

To repeat, we expect that nodes in different external files will become out 
of sync only very rarely. But this makes reporting this kind of mismatch 
*essential*, not optional.  Understand?

The framework (v.tempRoots) for detecting these rare mismatches now exists 
in the new-read branch, but more work is needed.

Testing all this is challenging.  I have no idea how to make unit tests for 
this.  I expect to complete work on this branch in a day or three.  After I 
have run all my by-hand tests I'll probably merge the new-read branch into 
the trunk fairly quickly, so that wider testing can happen asap.

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.

Reply via email to