Re: Aha/Doh! Recovered nodes are the the desired outline diffs

2017-06-16 Thread Edward K. Ream
On Friday, June 16, 2017 at 10:21:46 AM UTC-5, Edward K. Ream wrote: > I'll be satisfied with the present work once I have created leoGit.py. No need to do that now. Rev a2d53fc adds g.execGitCommand, with this signature: def execGitCommand(command, directory, limit=0, trace=False): See t

Re: Aha/Doh! Recovered nodes are the the desired outline diffs

2017-06-16 Thread Edward K. Ream
On Friday, June 16, 2017 at 10:00:01 AM UTC-5, Edward K. Ream wrote: > There is an even easier prototype: print statements...I'll play with this today, in the hopes of reaching a stopping point. I'm near that stopping point. Issuing this command (using subprocess) yields the full hashes of 151

Re: Aha/Doh! Recovered nodes are the the desired outline diffs

2017-06-16 Thread Edward K. Ream
On Friday, June 16, 2017 at 7:05:55 AM UTC-5, Edward K. Ream wrote: *Simple prototype* > > My current thinking about the user interface is to create an > outline-oriented analog of gitk within Leo. > There is an even easier prototype: print statements. This is helpful when I am being pulled in

Re: Aha/Doh! Recovered nodes are the the desired outline diffs

2017-06-16 Thread Edward K. Ream
On Wed, Jun 14, 2017 at 9:31 AM, Edward K. Ream wrote: For several years I've wondered if there was a way to show outline-oriented > diffs more clearly. Doh! Leo already has a way. After changing files > outside of Leo, say by using git revert/reset/checkout, Leo creates > "Recovered Nodes" nod

Re: Aha/Doh! Recovered nodes are the the desired outline diffs

2017-06-15 Thread Edward K. Ream
On Thu, Jun 15, 2017 at 9:20 AM, Edward K. Ream wrote: > On Thursday, June 15, 2017 at 9:11:14 AM UTC-5, Edward K. Ream wrote: > > > So now I can pass s1 and s2 to difflib. Mission accomplished. > > Sure, we can use git diff to give us a list of changed blobs (fragments), > but the task of relat

Re: Aha/Doh! Recovered nodes are the the desired outline diffs

2017-06-15 Thread Edward K. Ream
On Thursday, June 15, 2017 at 8:46:18 AM UTC-5, Terry Brown wrote: > > > > Also I have some Leo code for recursive tree comparisons... > https://github.com/leo-editor/snippets/blob/master/utils/diff_trees.py Thanks for this. Iirc, there is other tree comparison code somewhere in Leo. It will b

Re: Aha/Doh! Recovered nodes are the the desired outline diffs

2017-06-15 Thread Edward K. Ream
On Thursday, June 15, 2017 at 9:11:14 AM UTC-5, Edward K. Ream wrote: > So now I can pass s1 and s2 to difflib. Mission accomplished. Hehe. The infamous words "Mission accomplished" should have been a warning :-) Sure, we can use git diff to give us a list of changed blobs (fragments), but t

Re: Aha/Doh! Recovered nodes are the the desired outline diffs

2017-06-15 Thread Edward K. Ream
On Thursday, June 15, 2017 at 8:33:12 AM UTC-5, Terry Brown wrote: You're aware of > > https://docs.python.org/2/library/difflib.html > The question is how to get the "raw material" for difflib. I have just answered my second stack overflow

Re: Aha/Doh! Recovered nodes are the the desired outline diffs

2017-06-15 Thread Terry Brown
On Thu, 15 Jun 2017 08:33:07 -0500 Terry Brown wrote: > Also I have some Leo code for recursive tree comparisons that seems to > be not working currently, will see if I can get it working again. Actually it is working, I just wasn't using it right. I've posted it here: https://github.com/leo-ed

Re: Aha/Doh! Recovered nodes are the the desired outline diffs

2017-06-15 Thread Terry Brown
On Thu, 15 Jun 2017 06:17:43 -0700 (PDT) "Edward K. Ream" wrote: > Of course, all this assumes that there will be a way to make > gitpython easily available. > > Perhaps there is an easier way of getting the job done? Any ideas? You're aware of https://docs.python.org/2/library/difflib.html

Re: Aha/Doh! Recovered nodes are the the desired outline diffs

2017-06-15 Thread Edward K. Ream
On Wednesday, June 14, 2017 at 9:31:43 AM UTC-5, Edward K. Ream wrote: This suggests several straightforward changes to Leo: > > 1. Add a front-end to git diff that would create, say, "Git Diff" nodes > having roughly the same format as "Recovered Nodes" nodes. > I spent time yesterday and today

Aha/Doh! Recovered nodes are the the desired outline diffs

2017-06-14 Thread Edward K. Ream
For several years I've wondered if there was a way to show outline-oriented diffs more clearly. Doh! Leo already has a way. After changing files outside of Leo, say by using git revert/reset/checkout, Leo creates "Recovered Nodes" nodes when opening the file. Iirc, these diffs are not created