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.

Furthermore, now that Leo has Terry's excellent file update dialog, it 
should actually be possible to leave Leo open while switching branches!

> The real problems seem to involve caching:

cacher.createOutlineFromCacheList is the culprit.  At present, it simply 
skips over entire clone trees. This creates what you might call the 
"outline always wins" rule, which is even worse than the "last clone wins" 
rule.

Instead,createOutlineFromCacheList must update the cloned sub-outline 
outline from the external file. This is a major bug, which is mostly 
unrelated to read logic.

It will be tricky. A failed first attempt added duplicate or even 
triplicate clones throughout leoAtFile.py! (It would have done so for any 
other changed file) Fortunately, pyflakes warned about all these "duplicate 
unused" methods.  I removed dozens of clones by hand, so as not to lose all 
the notes to myself in the file.  Now I do regular backups of leoPy.leo. 
This is one file that git doesn't back up.

This mess was actually a good thing.  It showed the close relationship 
between the .leo file and all its external files.  Getting this 
relationship exactly right is the heart of #505.

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