This rev contains a grand rewrite of the read code in leoAtFile.py. The
new version of this code fixes bug 149: Clones can revert changes made by
git discard even with --no-cache
The new_clone_test switch, defined in leoGlobals.py, determines whether the
old or new version of the code is enabled. This switch is False in this
rev, so the *old* code is enabled.
All tests pass regardless of the value of this switch. I have been happily
eating my own dog food with new_clone_test = True.
There is a slight chance that new bugs could exist even when using the old
code. Please report any problems immediately.
In an emergency, reverting to 4e5ad1d, tagged bug-149-stage-0-complete
should be utterly safe.
Edward
P.S. The present code base illustrates my general strategy for making
massive code changes safely:
- Create a master switch, g.new_clone_test, to choose between the old and
new code.
- Make sure that the code with the switch OFF is, in effect, the old code.
- *Never* get cute with testing the switch. The pattern is::
if switch:
<< new code >>
else:
<< old code >>
If the new code is empty, the pattern is::
if switch:
pass
else:
<< old code >>
- Finally, when the new code has proven itself, remove the switch,
converting::
if switch:
<< new code >>
else:
<< old code >>
to::
<< new code >>
EKR
--
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 http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.