[PATCH 10 of 10 v5] histedit: log the time taken to read in the commands list
Simon Farnsworth
simonfar at fb.com
Wed Feb 15 22:07:00 UTC 2017
# HG changeset patch
# User Simon Farnsworth <simonfar at fb.com>
# 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()
More information about the Mercurial-devel
mailing list