copies: add time information to the debug information
authorBoris Feld <boris.feld@octobus.net>
Fri, 07 Sep 2018 11:43:48 -0400
changeset 40059 cf01616f8d96
parent 40058 25b2868206e2
child 40060 fda1df3d4e06
copies: add time information to the debug information
mercurial/copies.py
tests/test-mv-cp-st-diff.t
--- a/mercurial/copies.py	Fri Sep 07 11:16:06 2018 -0400
+++ b/mercurial/copies.py	Fri Sep 07 11:43:48 2018 -0400
@@ -204,11 +204,16 @@
         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):
--- a/tests/test-mv-cp-st-diff.t	Fri Sep 07 11:16:06 2018 -0400
+++ b/tests/test-mv-cp-st-diff.t	Fri Sep 07 11:43:48 2018 -0400
@@ -1676,6 +1676,7 @@
   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