File-Compare-Leo-Files creates "other file" clones

Bug #1160660 reported by SegundoBob
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
leo-editor
Fix Released
Medium
Edward K. Ream

Bug Description

Test procedure:

1) Start a console.

2) Let leomy be your script for starting Leo-Editor.
Suppose there is no file named "d1.leo" in the current working directory.
Execute command line: "leomy d1.leo"
This creates file d1.leo containing one node with headline "d1.leo".
Ctrl-S -- Write d1.leo
Alt-F4 -- Exit Leo-Editor

3) Suppose there is no file named "d2.leo" in the current working directory.
Execute command line: "leomy d2.leo"
This creates file d2.leo containing one node with headline "d2.leo".

4) Alt-c, f, c -- This pops up a file selection menu allowing you to pick the "other" Leo-Editor file to be compared to the current Leo-Editor file (d2.leo).
Pick file d1.leo.
This causes the comparison to be done.
This creates a subtree rooted by a node with headline "Compare .leo Files".

Note the messages output to the terminal:

 inserted (only in /home/ldi/tmp/d1.leo)
('bob05', '20130326174836', '1409') d1.leo

 deleted (only in /home/ldi/tmp/d2.leo)
('bob05', '20130326174847', '1409') d2.leo

 changed

-----
I believe released code should not to print such non-error messages on the terminal.
---------

5) Alt-o, x, a -- Expand all nodes

Note that node "Compare .leo Files-->inserted-->d1.leo" is marked as a clone.
This indicates a serious problem because the clone of this node is in the "other" .leo file. This is a "cross-file" clone link that as far as I know is not allowed.

Now try either step 6a) or 6b). They generate slightly different errors.

6a) Now try to select node "Compare .leo Files-->inserted-->d1.leo" by left-clicking it.
Note that the node is NOT selected--But note the errors on the terminal.

6b) Press Alt-downArrow 4 times. Note no errors have been reported.
Press Alt-downArrow a 5th time.
Note the errors displayed in the log pane and the the terminal.
---------
6a errors shown only in the terminal:

Traceback (most recent call last):
  File "/home/ldi/bzr/LeoLatest/leo/plugins/baseNativeTree.py", line 664, in onTreeSelect
    self.select(p)
  File "/home/ldi/bzr/LeoLatest/leo/core/leoFrame.py", line 2046, in select
    val = self.selectHelper(p,scroll=scroll)
  File "/home/ldi/bzr/LeoLatest/leo/core/leoFrame.py", line 2070, in selectHelper
    assert p.v.context == c
AssertionError
------

6b errors on terminal:
exception executing command
Traceback (most recent call last):

  File "/home/ldi/bzr/LeoLatest/leo/core/leoCommands.py", line 560, in doCommand
    val = command(event)

  File "/home/ldi/bzr/LeoLatest/leo/core/leoCommands.py", line 6657, in selectVisNext
    c.treeSelectHelper(p)

  File "/home/ldi/bzr/LeoLatest/leo/core/leoCommands.py", line 6691, in treeSelectHelper
    c.selectPosition(p)

  File "/home/ldi/bzr/LeoLatest/leo/core/leoCommands.py", line 8230, in selectPosition
    c.frame.tree.select(p)

  File "/home/ldi/bzr/LeoLatest/leo/core/leoFrame.py", line 2046, in select
    val = self.selectHelper(p,scroll=scroll)

  File "/home/ldi/bzr/LeoLatest/leo/core/leoFrame.py", line 2070, in selectHelper
    assert p.v.context == c

AssertionError
-------
6b) errors in red in log pane:

exception executing command
Traceback (most recent call last):
  File "/home/ldi/bzr/LeoLatest/leo/core/leoCommands.py", line 560, in doCommand
    val = command(event)
  File "/home/ldi/bzr/LeoLatest/leo/core/leoCommands.py", line 6657, in selectVisNext
    c.treeSelectHelper(p)
  File "/home/ldi/bzr/LeoLatest/leo/core/leoCommands.py", line 6691, in treeSelectHelper
    c.selectPosition(p)
  File "/home/ldi/bzr/LeoLatest/leo/core/leoCommands.py", line 8230, in selectPosition
    c.frame.tree.select(p)
  File "/home/ldi/bzr/LeoLatest/leo/core/leoFrame.py", line 2046, in select
    val = self.selectHelper(p,scroll=scroll)
  File "/home/ldi/bzr/LeoLatest/leo/core/leoFrame.py", line 2070, in selectHelper
    assert p.v.context == c
AssertionError

--------

I use Xubuntu 12.04 (precise)
Kernel 3.2.0-39-generic

Leo Log Window
Leo 4.11 devel, build 5639, 2013-03-24 11:01:23
Python 2.7.3, qt version 4.8.1
linux2
setting leoID from os.getenv('USER'): 'bob05'
load dir: /home/ldi/bzr/LeoLatest/leo/core
global config dir: /home/ldi/bzr/LeoLatest/leo/config
home dir: /home/bob05
reading settings in /home/ldi/bzr/LeoLatest/leo/config/leoSettings.leo
reading settings in /home/bob05/.leo/myLeoSettings.leo

Changed in leo-editor:
importance: Undecided → Medium
assignee: nobody → Edward K. Ream (edreamleo)
milestone: none → 4.11-b1
status: New → Confirmed
Revision history for this message
Edward K. Ream (edreamleo) wrote :

Fixed at rev 6051.

Changed in leo-editor:
status: Confirmed → Fix Released
Revision history for this message
SegundoBob (bhossley) wrote :

Rev. 6053 - Xubuntu 12.04: This bug has been fixed.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.