Re: Proposal: remove commit_timestamp.json

2016-10-17 Thread Edward K. Ream
On Mon, Oct 17, 2016 at 3:51 AM, Edward K. Ream  wrote:

> ​​
>


> When I awoke early this morning, I saw the way forward.  It should satisfy
> everybody:
>

​[snip]​


2. Create leo/core/
> ​​
> commit_timestamp.json in @button make-leo in leoDist.leo.
>

​The create_json function in leoVersion.py will create
​commit_timestamp.json. This file will contain the commit hash as well as
the timestamp.  This ensures that get_version_from_json does not need git
at all.

Edward

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: run pylint in leo-editor UnicodeDecodeError

2016-10-17 Thread Edward K. Ream
On Sun, Oct 16, 2016 at 8:41 PM, zhaohe wang  wrote:

>
> 
> Found it !!!
> ​​
> Line 207 in pylint-leo-rc-ref.txt
> You committed on 29 Feb.
>

​Thanks for this.  I'll clean the offending line before releasing Leo 5.4b1.

Edward

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Proposal: remove commit_timestamp.json

2016-10-17 Thread Edward K. Ream
​​


On Mon, Oct 17, 2016 at 3:51 AM, Edward K. Ream  wrote:

​When I awoke early this morning, I saw the way forward.  It should satisfy
> everybody:
>

​Rev 4c953099 puts the new scheme in place.  It seems to work well.

There is now no need for any git hooks.  You can disable them if you like,
but they won't interfere with anything if they exist.

leoVersion.py contains the new code. It is much simpler than the old.​

I'll be testing this further while creating Leo 5.4b1.  Expect it later
today.

Edward

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Proposal: remove commit_timestamp.json

2016-10-17 Thread Edward K. Ream
​​
On Sun, Oct 16, 2016 at 8:20 PM, Mike Hodson  wrote:

On Sun, Oct 16, 2016 at 7:12 PM, Edward K. Ream  wrote:
> > Here's an example.  I downloaded
> > leo-editor-281522323a89c27b7c58338b1eaa624cbd383078.zip
> > from two days ago.
>
> How?
>

​From the two days ago

link on the download leo page .​


​When I awoke early this morning, I saw the way forward.  It should satisfy
everybody:

1. Add​ commit_timestamp.json to .gitignore.  No more merge conflicts and
no more pollution of the git record.

2. Create leo/core/commit_timestamp.json in @button make-leo in
leoDist.leo. This will ensure that a valid commit_timestamp.json appears in
all official distributions, *without the need for git hooks*.

3. Add commit_timestamp.json back to the manifest in
launchLeo-unified.spec, so that pyinstaller will include it.

4. Change leoVersion.py so that it gets the commit hash and date from
commit_timestamp.json if it can not get it from git.

*Summary*

The correct commit hash and date will appear at signon in all official
distros, without devs having to install git hooks or worry about merge
commits on commit_timestamp.json.

I'll do this today, and test it, as part of releasing 5.4b1.

Edward

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Fw: Proposal: remove commit_timestamp.json

2016-10-17 Thread Edward K. Ream
On Mon, Oct 17, 2016 at 11:57 AM, Jacob Peck  wrote:

> I'm with Terry on this -- the commit_timestamp.json file has been
> immensely helpful in debugging user issues in the past.  Relegating the
> commit hash to some funky filename is not an acceptable option.
>

​Ok.  I can live with this.

I would like the hook that creates commit_timestamp.json to use the new
format. I'll see what I can do today.

Git hooks are painless.  Why is this suddenly an issue?
>

​Because they aren't painless :-).  And useless if a dev forgets to copy
them into leo-editor/.git when cloning a new repo.

In any event, the old code in leoVersion.py is much simpler than the old,
which knew way too much the structure of .git folders.  The new code just
uses git log -1.

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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Proposal: remove commit_timestamp.json

2016-10-17 Thread Edward K. Ream
On Mon, Oct 17, 2016 at 5:17 AM, Edward K. Ream  wrote:

​Rev 4c953099 puts the new scheme in place.  It seems to work well.

There is now no need for any git hooks.  You can disable them if you like,
but they won't interfere with anything if they exist.

​The format of ​commit_timestamp.json has changed.  It now looks like:

{"date": "Mon Oct 17 05:07:33 2016",
  "hash": "4c953099afa22f39def13f04a0df5cae62c86a1b"}

@button make-leo creates this file, so it doesn't matter if your git hook
messes with it, especially since your version won't be pushed ;-)

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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Proposal: remove commit_timestamp.json

2016-10-17 Thread Edward K. Ream
On Monday, October 17, 2016 at 5:24:23 AM UTC-5, Edward K. Ream wrote:

​Rev 4c953099 puts the new scheme in place.  It seems to work well.
>
> There is now no need for any git hooks.  You can disable them if you like, 
> but they won't interfere with anything if they exist.
>
> ​The format of ​commit_timestamp.json has changed.  It now looks like:
>
> {"date": "Mon Oct 17 05:07:33 2016",
>   "hash": "4c953099afa22f39def13f04a0df5cae62c86a1b"}
>
> @button make-leo creates this file, so it doesn't matter if your git hook 
> messes with it, especially since your version won't be pushed ;-)
>

Well, I had to remove commit_timestamp.json from .gitignore and add it back 
to the list of tracked files so that git archive would write it.

This is a bit disappointing, because it means that commit_timestamp.json 
will still be around.  Otoh, it won't cause any conflicts if we all remove 
our git hooks...

Edward

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


LeoDocs - User Guide update mod_http.py

2016-10-17 Thread lewis
LeoDocs - User Guide update request:

The mod_http plugin docstring refers to "Viewing loaded outlines in a 
browser, e.g. at http://localhost:8130/ "

LeoDocs.leo at Leo's Documentation-->Users Guide-->Plugins-->@rst 
html\plugins.html-->Gui-independent plugins-->Servers-->mod_http.py
2. Start a web browser, and enter the following url: http://localhost:8080/
should be 
2. Start a web browser, and enter the following url: http://localhost:8130/

Also update http://leoeditor.com/plugins.html#mod-http-py to match.


Regards
Lewis

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Proposal: remove commit_timestamp.json

2016-10-17 Thread 'Terry Brown' via leo-editor



 From: Edward K. Ream 
 To: leo-editor  
 Sent: Monday, October 17, 2016 3:51 AM
 Subject: Re: Proposal: remove commit_timestamp.json
   
​​On Sun, Oct 16, 2016 at 8:20 PM, Mike Hodson  wrote:


On Sun, Oct 16, 2016 at 7:12 PM, Edward K. Ream  wrote:
> Here's an example.  I downloaded
> leo-editor- 281522323a89c27b7c58338b1eaa62 4cbd383078.zip
> from two days ago.

How?


​From the two days ago link on the download leo page.​ 

​When I awoke early this morning, I saw the way forward.  It should satisfy 
everybody:

1. Add​ commit_timestamp.json to .gitignore.  No more merge conflicts and no 
more pollution of the git record.

2. Create leo/core/commit_timestamp.json in @button make-leo in leoDist.leo. 
This will ensure that a valid commit_timestamp.json appears in all official 
distributions, without the need for git hooks.

3. Add commit_timestamp.json back to the manifest in  launchLeo-unified.spec, 
so that pyinstaller will include it.

4. Change leoVersion.py so that it gets the commit hash and date from 
commit_timestamp.json if it can not get it from git.

Summary
The correct commit hash and date will appear at signon in all official distros, 
without devs having to install git hooks or worry about merge commits on 
commit_timestamp.json. I'll do this today, and test it, as part of releasing 
5.4b1.
I'm not really sure this has any utility :-/
We know the commit hash of official releases.  That was never the problem. The 
problem in some ways is that a git repo. can't contain its own hash. But more 
usefully, the issue is with interacting with users when addressing bugs.  You 
need to know the exact commit, it matters whether they're testing the version 
with an attempted fix, or the version before.  So, will we entertain this kind 
of interaction with non-git users? If Leo was a code editor, maybe we could 
justify excluding non-git users from that kind of interaction.  But 
unfortunately ;-) Leo is a multi-purpose tool used by authors, designers, 
hobbiests in various realms, etc. etc.
So, UserA reports an issue.  A dev. pushes an attempted fix and asks that they 
grab the latest version, 
https://github.com/leo-editor/leo-editor/archive/master.zip. Iterate a couple 
of times.  Are we on the same page version wise?  The most robust and *user* 
friendly way to be sure is useful info. in the log window.  I think only the 
original use of commit_timestamp.json achieved that.  The best compromise I've 
seen so far is to have them download 
https://github.com/leo-editor/leo-editor/archive/master@%7B0%20day%20ago%7D.zip 
and tell us that they're running Leo from a folder called 
leo-editor-f94ab524d406a5431d94523d4bc49b47c380e5c7.
Cheers -Terry


Edward
-- 
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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


   
 

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Devs: please delete your git hooks

2016-10-17 Thread Edward K. Ream
These are the commit-msg and pre-commit files in leo-editor/.git/hooks.

They won't do any harm, or even be all that inconvenient, but they serve no 
purpose now.

Edward

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Proposal: remove commit_timestamp.json

2016-10-17 Thread Edward K. Ream
On Monday, October 17, 2016 at 11:23:08 AM UTC-5, Edward K. Ream wrote:

> To recap, the new scheme is *much *better than the old because:

That summary, while true, doesn't get to the heart of the matter.  And it's 
repetitious.

In fact, we need commit_timestamp.json only at the *exact instant* an 
official release or daily build is being created. There is no need to 
create the .json file on every single commit.

The new format of the .json file describes *exactly* the commit, avoiding 
the problem that a build can't mention its own hash.

The @button make-leo script makes the .json file for official releases. The 
script that makes daily snapshots should also make this .json file, in the 
new format.

Edward

>

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Fw: Proposal: remove commit_timestamp.json

2016-10-17 Thread 'Terry Brown' via leo-editor
[meant to post to the list, not just Edward]




 From: Edward K. Ream 
 To: leo-editor  
Cc: terry_n_br...@yahoo.com
 Sent: Monday, October 17, 2016 11:23 AM
 Subject: Re: Proposal: remove commit_timestamp.json
   
On Monday, October 17, 2016 at 9:04:52 AM UTC-5, Terry Brown wrote:


I'm not really sure this has any utility :-/
I am about to release Leo 5.4b1. Imo, the new scheme works very well.


Leo always reports first 8 characters of the git hash and git date, even when 
there is no git around, which is almost all the time for most users.

This works because official releases now do include commit_timestamp.json.

The script that creates daily builds should be modified to create 
commit_timestamp.json in the new format. Once that is done, everything will 
"just work".

As noted earlier in this thread, there is no script that creates the daily 
builds, there hasn't been since April 6, 2014: 
https://groups.google.com/d/msg/leo-editor/Hr-ygxeMPm4/tfCZxOCcv4wJ
When you use a link 
like:https://github.com/leo-editor/leo-editor/archive/master@{5 days ago}.zip
GitHub sends you leo-editor-438e...92e4.zip.  That's what we have now on the 
Leo downloads page.
So with the new scheme all we have for user interaction / bug resolution is 
asking the user the funky name of the folder they're running from, if we 
re-link "Latest" to ...{0 days ago}.zip
*Even if there was a script*, it wouldn't help that much, even running at 15 
minute intervals could create significant confusion re latest versions.
Cheers -Terry

To recap, the new scheme is much better than the old because:

- No git hooks are ever needed.
- There will be no git merge conflicts on commit_timestamp.json once people 
remove their git hooks.
- Leo always reports the hash and the date of the build that is being run, or 
will, once the daily build script is updated.)
- The code in leoVersion.py is really simple.

Edward


   
 


   
 

   
 

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Proposal: remove commit_timestamp.json

2016-10-17 Thread Edward K. Ream
On Monday, October 17, 2016 at 9:04:52 AM UTC-5, Terry Brown wrote:

I'm not really sure this has any utility :-/
>

I am about to release Leo 5.4b1. Imo, the new scheme works very well.

Leo *always* reports first 8 characters of the git hash and git date, even 
when there is no git around, which is almost all the time for most users.

This works because official releases now *do* include commit_timestamp.json.

The script that creates daily builds should be modified to create 
commit_timestamp.json *in the new format.* Once that is done, everything 
will "just work".

To recap, the new scheme is *much *better than the old because:

- No git hooks are ever needed.
- There will be no git merge conflicts on commit_timestamp.json once people 
remove their git hooks.
- Leo *always* reports the hash and the date of the build that is being 
run, or will, once the daily build script is updated.)
- The code in leoVersion.py is really simple.

Edward

>

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Fw: Proposal: remove commit_timestamp.json

2016-10-17 Thread Jacob Peck
I'm with Terry on this -- the commit_timestamp.json file has been 
immensely helpful in debugging user issues in the past.  Relegating the 
commit hash to some funky filename is not an acceptable option.


Git hooks are painless.  Why is this suddenly an issue?

-->Jake

On 10/17/2016 12:50 PM, 'Terry Brown' via leo-editor wrote:

[meant to post to the list, not just Edward]



*From:* Edward K. Ream 
*To:* leo-editor 
*Cc:* terry_n_br...@yahoo.com
*Sent:* Monday, October 17, 2016 11:23 AM
*Subject:* Re: Proposal: remove commit_timestamp.json

On Monday, October 17, 2016 at 9:04:52 AM UTC-5, Terry Brown
wrote:

I'm not really sure this has any utility :-/

I am about to release Leo 5.4b1. Imo, the new scheme works
very well.

Leo /always/ reports first 8 characters of the git hash and
git date, even when there is no git around, which is almost
all the time for most users.

This works because official releases now /do/ include
commit_timestamp.json.

The script that creates daily builds should be modified to
create commit_timestamp.json /in the new format./ Once that is
done, everything will "just work".

As noted earlier in this thread, there is no script that creates
the daily builds, there hasn't been since
April 6, 2014:
https://groups.google.com/d/msg/leo-editor/Hr-ygxeMPm4/tfCZxOCcv4wJ

When you use a link like:
https://github.com/leo-editor/leo-editor/archive/master@{5 days
ago}.zip


GitHub sends you leo-editor-438e...92e4.zip.  That's what we have
now on the Leo downloads page.

So with the new scheme all we have for user interaction / bug
resolution is asking the user the funky name of the folder they're
running from, if we re-link "Latest" to ...{0 days ago}.zip

*Even if there was a script*, it wouldn't help that much, even
running at 15 minute intervals could create significant confusion
re latest versions.

Cheers -Terry

To recap, the new scheme is /much /better than the old because:

- No git hooks are ever needed.
- There will be no git merge conflicts on
commit_timestamp.json once people remove their git hooks.
- Leo /always/ reports the hash and the date of the build that
is being run, or will, once the daily build script is updated.)
- The code in leoVersion.py is really simple.


Edward





--
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 leo-editor+unsubscr...@googlegroups.com 
.
To post to this group, send email to leo-editor@googlegroups.com 
.

Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


--
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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Fw: Proposal: remove commit_timestamp.json

2016-10-17 Thread 'Terry Brown' via leo-editor


 
  From: Edward K. Ream 
 To: leo-editor  
 Sent: Monday, October 17, 2016 1:40 PM
 Subject: Re: Fw: Proposal: remove commit_timestamp.json
  
On Mon, Oct 17, 2016 at 11:57 AM, Jacob Peck  wrote:

  I'm with Terry on this -- the commit_timestamp.json file has been immensely 
helpful in debugging user issues in the past.  Relegating the commit hash to 
some funky filename is not an acceptable option.


​Ok.  I can live with this.
Ok :-) next time I want to make a point I'll just ask Jacob to post it :-)

I would like the hook that creates commit_timestamp.json to use the new format. 
I'll see what I can do today.
It might be a source of confusion if the commit hash and timestamp sometimes 
agree (i.e. when .git is present), and sometimes don't (i.e. when the commit 
hash comes from git log -1).
If I'm understanding the new format, the githash Leo displays in the log would 
be for the preceding commit, when .git is not present, and the current commit, 
when it is?  Or perhaps it doesn't display the hash when .git is not present, 
but then there's not much point having it in the .json file.
This is how the use of "20160722143100" as a replacement for a commit hash 
evolved.  I think it's a better atomic identifier than "Mon Oct 17 05:07:33 
2016".  For one thing it has no spaces in it.
Cheers -Terry


Git hooks are painless.  Why is this suddenly an issue?


​Because they aren't painless :-).  And useless if a dev forgets to copy them 
into leo-editor/.git when cloning a new repo.

In any event, the old code in leoVersion.py is much simpler than the old, which 
knew way too much the structure of .git folders.  The new code just uses git 
log -1.

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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


   
 

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Fw: Proposal: remove commit_timestamp.json

2016-10-17 Thread Edward K. Ream
On Mon, Oct 17, 2016 at 11:57 AM, Jacob Peck  wrote:

​> ​
Why is this suddenly an issue?

​A better answer is that I have been working on distribution for the last
three days.  Problems come up in that context that we completely ignore
normally.

Let's be clear.  The new signon message is *much* better than before when
using git.  That's not going away.

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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.