In order to fix this bug: "
refresh from disk - cut node resurrection", https://bugs.launchpad.net/leo-editor/+bug/1090950, Leo now ensures that all gnx's in Leo are unicode strings. Previously, they were a mishmash of bytes, strings and tuples.
Here is the checkin log for rev 3fbeeb1...
QQQ
A mass change to the code base, preparing to fix the refresh-from-disk bug. Added g.new_gnxs switch and related logic. v.fileIndex is now always a unicode string, as are all gnx's and all keys in fc.gnxDict. All tests pass.
QQQ
There is a (remote??) possibility that these changes will break the reading of truly ancient .leo files. Please report any problems immediately.
To minimize that possibility, the NodeIndices.toString and NodeIndices.scanGnx methods retain their signatures and (mostly) their essential behaviors.
If you do experience any problem, you should be able to fix the problem by setting g.new_gnxs = False.
Edward
P.S. The post, A shock...,
https://groups.google.com/forum/#!topic/leo-editor/nIl3ud7Tbig states that fixing this bug can not be done in Leo 4.x. I have no idea why I was so timid. It looks like rebuilding fc.gnxDict when reloading a file should suffice. This is not trivial, but adding a "refresh" keyword argument to various top-level atFile read methods should be all that is needed. We shall see...
EKR