[PATCH 7 of 8 v4] extdiff: log time spent in external diff program
Simon Farnsworth
simonfar at fb.com
Mon Feb 13 12:29:07 EST 2017
# HG changeset patch
# User Simon Farnsworth <simonfar at fb.com>
# Date 1486994849 28800
# Mon Feb 13 06:07:29 2017 -0800
# Node ID 0727b4d77849fbefbf1ce1de6d9fe22ad2c5e1bd
# Parent 67a55b66a69520f84552cf3c1a7d93202c3f43da
extdiff: log time spent in external diff program
We can't fix the time external diff programs take to run. Log that duration
for us to remove from any stats we gather
diff --git a/hgext/extdiff.py b/hgext/extdiff.py
--- a/hgext/extdiff.py
+++ b/hgext/extdiff.py
@@ -273,7 +273,8 @@
cmdline = re.sub(regex, quote, cmdline)
ui.debug('running %r in %s\n' % (cmdline, tmproot))
- ui.system(cmdline, cwd=tmproot)
+ with ui.timeblockedsection('extdiff'):
+ ui.system(cmdline, cwd=tmproot)
for copy_fn, working_fn, mtime in fns_and_mtime:
if os.lstat(copy_fn).st_mtime != mtime:
More information about the Mercurial-devel
mailing list