shadow file name collisions cause spontaneous clone creation

Bug #1282362 reported by tbnorth
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
leo-editor
Fix Released
Undecided
Unassigned

Bug Description

Create a new leo file.

Create @shadow foo.txt
Set body to @others, add two children, with different body texts.
Copy / paste the @shadow node, change the path to x/foo.txt
(In shell, create x folder, saving shadow doesn't create path, which is maybe another bug)
save and close file

open file again, children of shadow nodes are clones of each other. I think it's the name collision, not the copy pasting etc.

Revision history for this message
Edward K. Ream (edreamleo) wrote :
Changed in leo-editor:
status: New → Fix Released
Revision history for this message
Edward K. Ream (edreamleo) wrote :

This scenario works for me. Furthermore, the scenario is unlikely to cause any problems.

Revision history for this message
Matt Wilkie (maphew) wrote : Re: [Bug 1282362] Re: shadow file name collisions cause spontaneous clone creation

this sounds similar to ...

That's weird, I swear I created a bug this weekend about spontaneous
clones. I spent an hour or more writing it up, reducing to smallest
reproducible test case and screenshots and all. Anyway, I wasn't using
@shadow, here's the file, non-shortened version, which produces spontaneous
clones:

https://github.com/maphew/apt/blob/master/apt.py

-matt

On Mon, Nov 3, 2014 at 8:32 AM, Edward K. Ream <email address hidden> wrote:

> This scenario works for me. Furthermore, the scenario is unlikely to
> cause any problems.
>
> --
> You received this bug notification because you are a member of The Leo
> editor team, which is subscribed to leo-editor.
> https://bugs.launchpad.net/bugs/1282362
>
> Title:
> shadow file name collisions cause spontaneous clone creation
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/leo-editor/+bug/1282362/+subscriptions
>

Revision history for this message
Edward K. Ream (edreamleo) wrote :

On Mon, Nov 3, 2014 at 5:20 PM, Matt Wilkie <email address hidden> wrote:

> here's the file, non-shortened version, which produces spontaneous
> clones:
>
> https://github.com/maphew/apt/blob/master/apt.py
>

​Thanks for this. I see the clones when I import apt.py, but I'm not
convinced this is a clone issue.

Indeed, apt.py contains six copies of the following sentinel::

#@+middle:maphew.20141031145131.3: ** __name__ __main__ runner

+middle lines are part of the @others logic (I forget the details). I would
guess this is a problem with either the read or write logic, or both.

I see the imported outline, but without the original .leo file I have no
way of knowing what you really intended. Can you send to me?

Edward

Revision history for this message
Edward K. Ream (edreamleo) wrote :

On Tue, Nov 4, 2014 at 6:57 AM, Edward K. Ream <email address hidden> wrote:

​> ​
I see the clones when I import apt.py, but I'm not convinced this is a
clone issue.

​The following works::

Define main (in a separate node) as::

    def main():
        <<globals>>
        <<parse command line>>
        <<post-parse globals>>
        <<run the commands>>
        <<wrap up>>

And then do the typical::

if __name__ == "__main__":
    main()

Clones go away.

Yes, there is a problem, but I'm pretty sure it has to do with @others
expansion, not clones. The @others expansion logic at the top-level node
is probably clashing, in some weird way, the the section references.

Anyway, I need the original .leo file before looking into this. Imo, this
is not a release stopper for a1.

Edward

Revision history for this message
Matt Wilkie (maphew) wrote :

ok, source .leo file and some of the history I've been able to dig up at:
https://github.com/leo-editor/leo-editor/issues/89

On Tue, Nov 4, 2014 at 5:07 AM, Edward K. Ream <email address hidden> wrote:

> On Tue, Nov 4, 2014 at 6:57 AM, Edward K. Ream <email address hidden>
> wrote:
>
> ​> ​
> I see the clones when I import apt.py, but I'm not convinced this is a
> clone issue.
>
> ​The following works::
>
> Define main (in a separate node) as::
>
> def main():
> <<globals>>
> <<parse command line>>
> <<post-parse globals>>
> <<run the commands>>
> <<wrap up>>
>
> And then do the typical::
>
> if __name__ == "__main__":
> main()
>
> Clones go away.
>
> Yes, there is a problem, but I'm pretty sure it has to do with @others
> expansion, not clones. The @others expansion logic at the top-level node
> is probably clashing, in some weird way, the the section references.
>
> Anyway, I need the original .leo file before looking into this. Imo, this
> is not a release stopper for a1.
>
> Edward
>
> --
> You received this bug notification because you are a member of The Leo
> editor team, which is subscribed to leo-editor.
> https://bugs.launchpad.net/bugs/1282362
>
> Title:
> shadow file name collisions cause spontaneous clone creation
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/leo-editor/+bug/1282362/+subscriptions
>

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.