changeset 30983:d4825798818b

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.
author Simon Farnsworth <simonfar@fb.com>
date Wed, 15 Feb 2017 13:34:06 -0800
parents 08e6f4dac2ca
children 15f9084a9a0c
files hgext/histedit.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/histedit.py	Wed Feb 15 13:34:06 2017 -0800
+++ b/hgext/histedit.py	Wed Feb 15 13:34:06 2017 -0800
@@ -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()