From patchwork Thu Oct 4 14:44:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [10,of,10,V4] copies: add time information to the debug information From: Boris Feld X-Patchwork-Id: 35458 Message-Id: <52df778523d6452333c0.1538664284@localhost.localdomain> To: mercurial-devel@mercurial-scm.org Date: Thu, 04 Oct 2018 16:44:44 +0200 # HG changeset patch # User Boris Feld # Date 1536335028 14400 # Fri Sep 07 11:43:48 2018 -0400 # Node ID 52df778523d6452333c0e723c758664f9d2f3adc # Parent 058dcc45af9ad6d6b1073b5cfa59ae4cd88a2860 # EXP-Topic copy-perf # Available At https://bitbucket.org/octobus/mercurial-devel/ # hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 52df778523d6 copies: add time information to the debug information diff --git a/mercurial/copies.py b/mercurial/copies.py --- a/mercurial/copies.py +++ b/mercurial/copies.py @@ -204,11 +204,16 @@ def _committedforwardcopies(a, b, match) fctx = b[f] fctx._ancestrycontext = ancestrycontext + if debug: + start = util.timer() ofctx = _tracefile(fctx, am, limit) if ofctx: if debug: dbg('debug.copies: rename of: %s\n' % ofctx._path) cm[f] = ofctx.path() + if debug: + dbg('debug.copies: time: %s seconds\n' + % (util.timer() - start)) return cm def _forwardcopies(a, b, match=None): diff --git a/tests/test-mv-cp-st-diff.t b/tests/test-mv-cp-st-diff.t --- a/tests/test-mv-cp-st-diff.t +++ b/tests/test-mv-cp-st-diff.t @@ -1676,6 +1676,7 @@ Check debug output for copy tracing debug.copies: missing file to search: 1 debug.copies: tracing file: renamed debug.copies: rename of: f + debug.copies: time: * seconds (glob) A renamed f R f