On Sat, Aug 29, 2009 at 8:29 AM, Ville M. Vainio <[email protected]> wrote:

>
> On Sat, Aug 29, 2009 at 2:43 PM, Edward K. Ream<[email protected]>
> wrote:
>
> > Thanks for this tip.  The bug should be easy to fix once it can be
> > reproduced reliably.
>
> I was not able to cause problems with this when I implemented hash
> caching, that's why I left the implementation as it is (because I
> still think it's the more elegant way)


I'm a bit concerned that the caching data is a list of lists.  That makes it
hard to extend the format of cached data.  A dictionary whose entries might
be other dictionaries would be more flexible.

At present, the expansion bits in <v> elements of a .leo file are not
handled properly, regardless of caching.  I have a dim memory that that was
on purpose.  But if, say, we did want to remember expansion bits inside
@thin trees, we would have no way to do so in the present caching scheme.


> It might be easier not to try to reproduce it, but just change the
> implementation and ensure that the new implementation still works like
> the old one (i.e. hash caching creates the "right" kind of trees).


The problem was easy to reproduce:  I created a small .leo file containing
only:

@thin a.txt [body = @all]
 - clone
@thin b.txt [body = @others]
 - clone

This, I take it, was the essence of the problems I was having with bzr.

In an external editor, change a.clone.  See that it overrides b.clone.

I fixed the bug by having fast_add_last_child return the tuple
(is_clone,child).

create_tree_at_vnode sets  child.b,child.h = b,h if is_clone is True.

This fix appears to work as expected.  I'll push it later today after eating
my own dog food awhile.

Edward

P.S. I moved the tree stuff out of leoGlobals.py into leoNodes.py.

EKR

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to