Submitter | phabricator |
---|---|
Date | Oct. 7, 2019, 8:08 p.m. |
Message ID | <differential-rev-PHID-DREV-w7fvfewcst6vonrpuuzm-req@mercurial-scm.org> |
Download | mbox | patch |
Permalink | /patch/42072/ |
State | Superseded |
Headers | show |
Comments
Patch
diff --git a/mercurial/lsprof.py b/mercurial/lsprof.py --- a/mercurial/lsprof.py +++ b/mercurial/lsprof.py @@ -143,16 +143,3 @@ res = res.encode('latin-1') return res - - -if __name__ == '__main__': - import os - - sys.argv = sys.argv[1:] - if not sys.argv: - print(b"usage: lsprof.py <script> <arguments...>", file=sys.stderr) - sys.exit(2) - sys.path.insert(0, os.path.abspath(os.path.dirname(sys.argv[0]))) - stats = profile(execfile, sys.argv[0], globals(), locals()) - stats.sort() - stats.pprint()