equal
deleted
inserted
replaced
25 libdir = os.path.join(os.path.dirname(os.path.realpath(__file__)), |
25 libdir = os.path.join(os.path.dirname(os.path.realpath(__file__)), |
26 libdir) |
26 libdir) |
27 libdir = os.path.abspath(libdir) |
27 libdir = os.path.abspath(libdir) |
28 sys.path.insert(0, libdir) |
28 sys.path.insert(0, libdir) |
29 |
29 |
30 # enable importing on demand to reduce startup time |
30 from hgdemandimport import tracing |
31 try: |
31 with tracing.log('hg script'): |
32 if sys.version_info[0] < 3 or sys.version_info >= (3, 6): |
32 # enable importing on demand to reduce startup time |
33 import hgdemandimport; hgdemandimport.enable() |
33 try: |
34 except ImportError: |
34 if sys.version_info[0] < 3 or sys.version_info >= (3, 6): |
35 sys.stderr.write("abort: couldn't find mercurial libraries in [%s]\n" % |
35 import hgdemandimport; hgdemandimport.enable() |
36 ' '.join(sys.path)) |
36 except ImportError: |
37 sys.stderr.write("(check your install and PYTHONPATH)\n") |
37 sys.stderr.write("abort: couldn't find mercurial libraries in [%s]\n" % |
38 sys.exit(-1) |
38 ' '.join(sys.path)) |
|
39 sys.stderr.write("(check your install and PYTHONPATH)\n") |
|
40 sys.exit(-1) |
39 |
41 |
40 from mercurial import dispatch |
42 from mercurial import dispatch |
41 dispatch.run() |
43 dispatch.run() |