mercurial/dispatch.py
changeset 29783 5d44197c208b
parent 29782 97bfc2e5fba5
child 29784 e3501546f7e4
--- a/mercurial/dispatch.py	Sun Aug 14 16:35:58 2016 -0700
+++ b/mercurial/dispatch.py	Sun Aug 14 18:25:22 2016 -0700
@@ -909,7 +909,8 @@
             raise error.CommandError(cmd, _("invalid arguments"))
 
     if ui.configbool('profiling', 'enabled'):
-        return profiling.profile(ui, checkargs)
+        with profiling.profile(ui):
+            return checkargs()
     else:
         return checkargs()