mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 00:14:35 +03:00
f1518f6d73
Summary: Reorder the imports to make the module checker happy. The module checker should be aware of Cython module paths. Do it manually. Test Plan: Run `test-check-module-imports.t` Reviewers: durham, #mercurial Reviewed By: durham Differential Revision: https://phabricator.intern.facebook.com/D6688384 Signature: 6688384:1515540420:bec02696b24c12cb4fa2595fd235fc8f3246b2a2
21 lines
549 B
Python
Executable File
21 lines
549 B
Python
Executable File
#!/usr/bin/env python
|
|
|
|
from __future__ import absolute_import, print_function
|
|
|
|
import os
|
|
import sys
|
|
|
|
from hgext import traceprof
|
|
from mercurial import ui as uimod
|
|
|
|
if __name__ == '__main__':
|
|
sys.argv = sys.argv[1:]
|
|
if not sys.argv:
|
|
print("usage: traceprof.py <script> <arguments...>", file=sys.stderr)
|
|
sys.exit(2)
|
|
sys.path.insert(0, os.path.abspath(os.path.dirname(sys.argv[0])))
|
|
u = uimod.ui()
|
|
u.setconfig('traceprof', 'timethreshold', 0)
|
|
with traceprof.profile(u, sys.stderr):
|
|
execfile(sys.argv[0])
|