mercurial/dispatch.py
changeset 27615 4030d3b79953
parent 27516 1c1216182dc1
child 27623 b3376fba4ab9
equal deleted inserted replaced
27614:1d7e824ad093 27615:4030d3b79953
     3 # Copyright 2005-2007 Matt Mackall <mpm@selenic.com>
     3 # Copyright 2005-2007 Matt Mackall <mpm@selenic.com>
     4 #
     4 #
     5 # This software may be used and distributed according to the terms of the
     5 # This software may be used and distributed according to the terms of the
     6 # GNU General Public License version 2 or any later version.
     6 # GNU General Public License version 2 or any later version.
     7 
     7 
     8 from __future__ import absolute_import
     8 from __future__ import absolute_import, print_function
     9 
     9 
    10 import atexit
    10 import atexit
    11 import difflib
    11 import difflib
    12 import errno
    12 import errno
    13 import os
    13 import os
   968         thread.start()
   968         thread.start()
   969         func()
   969         func()
   970     finally:
   970     finally:
   971         thread.stop()
   971         thread.stop()
   972         thread.join()
   972         thread.join()
   973         print 'Collected %d stack frames (%d unique) in %2.2f seconds.' % (
   973         print('Collected %d stack frames (%d unique) in %2.2f seconds.' % (
   974             time.clock() - start_time, thread.num_frames(),
   974             time.clock() - start_time, thread.num_frames(),
   975             thread.num_frames(unique=True))
   975             thread.num_frames(unique=True)))
   976 
   976 
   977 
   977 
   978 def statprofile(ui, func, fp):
   978 def statprofile(ui, func, fp):
   979     try:
   979     try:
   980         import statprof
   980         import statprof