Re: [PATCH 10 of 10 v5] histedit: log the time taken to read in the commands list

2017-02-16 Thread Martin von Zweigbergk via Mercurial-devel
On Wed, Feb 15, 2017 at 4:05 PM, Bryan O'Sullivan  wrote:
>
> On Wed, Feb 15, 2017 at 2:07 PM, Simon Farnsworth  wrote:
>>
>> histedit: log the time taken to read in the commands list
>
>
> Series looks great. Ship it!

Looks like this was queued (by Augie), thanks. I'm working my way
through it now.


>
> ___
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


Re: [PATCH 10 of 10 v5] histedit: log the time taken to read in the commands list

2017-02-15 Thread Bryan O'Sullivan
On Wed, Feb 15, 2017 at 2:07 PM, Simon Farnsworth  wrote:

> histedit: log the time taken to read in the commands list
>

Series looks great. Ship it!
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


[PATCH 10 of 10 v5] histedit: log the time taken to read in the commands list

2017-02-15 Thread Simon Farnsworth
# HG changeset patch
# User Simon Farnsworth 
# Date 1487194446 28800
#  Wed Feb 15 13:34:06 2017 -0800
# Node ID b9cf9ffdf15f67b42e87272e2fb328102e8284ba
# Parent  c17e5f194dca47819ca2d636a3c9cfdf02733ba7
histedit: log the time taken to read in the commands list

If we're being fed an external command list from stdin (histedit --commands -),
then the time spent reading stdin is outside our control. Log it.

diff --git a/hgext/histedit.py b/hgext/histedit.py
--- a/hgext/histedit.py
+++ b/hgext/histedit.py
@@ -992,7 +992,8 @@
 
 def _readfile(ui, path):
 if path == '-':
-return ui.fin.read()
+with ui.timeblockedsection('histedit'):
+return ui.fin.read()
 else:
 with open(path, 'rb') as f:
 return f.read()
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel