Patchwork [09,of,10,v5] extdiff: log time spent in external diff program

login
register
mail settings
Submitter Simon Farnsworth
Date Feb. 15, 2017, 10:06 p.m.
Message ID <c17e5f194dca47819ca2.1487196419@devvm022.lla2.facebook.com>
Download mbox | patch
Permalink /patch/18522/
State Accepted
Headers show

Comments

Simon Farnsworth - Feb. 15, 2017, 10:06 p.m.
# HG changeset patch
# User Simon Farnsworth <simonfar@fb.com>
# Date 1487194446 28800
#      Wed Feb 15 13:34:06 2017 -0800
# Node ID c17e5f194dca47819ca2d636a3c9cfdf02733ba7
# Parent  124f329bc78f53abce06a1e8e6244fcdcc551e34
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
via Mercurial-devel - Feb. 16, 2017, 10:26 p.m.
[+mercurial-devel]

On Thu, Feb 16, 2017 at 2:26 PM, Martin von Zweigbergk
<martinvonz@google.com> wrote:
> On Wed, Feb 15, 2017 at 2:06 PM, Simon Farnsworth <simonfar@fb.com> wrote:
>> # HG changeset patch
>> # User Simon Farnsworth <simonfar@fb.com>
>> # Date 1487194446 28800
>> #      Wed Feb 15 13:34:06 2017 -0800
>> # Node ID c17e5f194dca47819ca2d636a3c9cfdf02733ba7
>> # Parent  124f329bc78f53abce06a1e8e6244fcdcc551e34
>> 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
>
> The commit message seems misleading, or I'm not understanding the
> patch right. IIUC, the time is logged even before this patch, and the
> patch only improve it to say that it's "extdiff" that's taking the
> time. Correct?
>
>>
>> diff --git a/hgext/extdiff.py b/hgext/extdiff.py
>> --- a/hgext/extdiff.py
>> +++ b/hgext/extdiff.py
>> @@ -273,7 +273,7 @@
>>          cmdline = re.sub(regex, quote, cmdline)
>>
>>          ui.debug('running %r in %s\n' % (cmdline, tmproot))
>> -        ui.system(cmdline, cwd=tmproot)
>> +        ui.system(cmdline, cwd=tmproot, blockedtag='extdiff')
>>
>>          for copy_fn, working_fn, mtime in fns_and_mtime:
>>              if os.lstat(copy_fn).st_mtime != mtime:
>> _______________________________________________
>> Mercurial-devel mailing list
>> Mercurial-devel@mercurial-scm.org
>> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

diff --git a/hgext/extdiff.py b/hgext/extdiff.py
--- a/hgext/extdiff.py
+++ b/hgext/extdiff.py
@@ -273,7 +273,7 @@ 
         cmdline = re.sub(regex, quote, cmdline)
 
         ui.debug('running %r in %s\n' % (cmdline, tmproot))
-        ui.system(cmdline, cwd=tmproot)
+        ui.system(cmdline, cwd=tmproot, blockedtag='extdiff')
 
         for copy_fn, working_fn, mtime in fns_and_mtime:
             if os.lstat(copy_fn).st_mtime != mtime: