hg
branchstable
changeset 49366 288de6f5d724
parent 48957 edab75a4c1da
child 50534 057639af827c
equal deleted inserted replaced
49364:e8ea403b1c46 49366:288de6f5d724
     4 #
     4 #
     5 # Copyright 2005-2007 Olivia Mackall <olivia@selenic.com>
     5 # Copyright 2005-2007 Olivia Mackall <olivia@selenic.com>
     6 #
     6 #
     7 # This software may be used and distributed according to the terms of the
     7 # This software may be used and distributed according to the terms of the
     8 # GNU General Public License version 2 or any later version.
     8 # GNU General Public License version 2 or any later version.
     9 from __future__ import absolute_import
       
    10 
     9 
    11 import os
    10 import os
    12 import sys
    11 import sys
    13 
    12 
    14 libdir = '@LIBDIR@'
    13 libdir = '@LIBDIR@'
    42 from hgdemandimport import tracing
    41 from hgdemandimport import tracing
    43 
    42 
    44 with tracing.log('hg script'):
    43 with tracing.log('hg script'):
    45     # enable importing on demand to reduce startup time
    44     # enable importing on demand to reduce startup time
    46     try:
    45     try:
    47         if sys.version_info[0] < 3 or sys.version_info >= (3, 6):
    46         import hgdemandimport
    48             import hgdemandimport
       
    49 
    47 
    50             hgdemandimport.enable()
    48         hgdemandimport.enable()
    51     except ImportError:
    49     except ImportError:
    52         sys.stderr.write(
    50         sys.stderr.write(
    53             "abort: couldn't find mercurial libraries in [%s]\n"
    51             "abort: couldn't find mercurial libraries in [%s]\n"
    54             % ' '.join(sys.path)
    52             % ' '.join(sys.path)
    55         )
    53         )