mercurial/util.py
changeset 22638 0d0350cfc7ab
parent 22633 92b54547ac5d
child 22643 3b1c0e1ede4c
equal deleted inserted replaced
22637:149141c3a25f 22638:0d0350cfc7ab
    11 
    11 
    12 This contains helper routines that are independent of the SCM core and
    12 This contains helper routines that are independent of the SCM core and
    13 hide platform-specific details from the core.
    13 hide platform-specific details from the core.
    14 """
    14 """
    15 
    15 
    16 from i18n import _
    16 import i18n
       
    17 _ = i18n._
    17 import error, osutil, encoding
    18 import error, osutil, encoding
    18 import errno, shutil, sys, tempfile, traceback
    19 import errno, shutil, sys, tempfile, traceback
    19 import re as remod
    20 import re as remod
    20 import os, time, datetime, calendar, textwrap, signal, collections
    21 import os, time, datetime, calendar, textwrap, signal, collections
    21 import imp, socket, urllib
    22 import imp, socket, urllib
   465     # executable version (py2exe) doesn't support __file__
   466     # executable version (py2exe) doesn't support __file__
   466     datapath = os.path.dirname(sys.executable)
   467     datapath = os.path.dirname(sys.executable)
   467 else:
   468 else:
   468     datapath = os.path.dirname(__file__)
   469     datapath = os.path.dirname(__file__)
   469 
   470 
       
   471 i18n.setdatapath(datapath)
       
   472 
   470 _hgexecutable = None
   473 _hgexecutable = None
   471 
   474 
   472 def hgexecutable():
   475 def hgexecutable():
   473     """return location of the 'hg' executable.
   476     """return location of the 'hg' executable.
   474 
   477