mercurial/util.py
changeset 30301 8321b083a83d
parent 30265 6a8aff737a17
child 30309 4b1af1c867fa
equal deleted inserted replaced
30300:42af0590f4b9 30301:8321b083a83d
   936     # executable version (py2exe) doesn't support __file__
   936     # executable version (py2exe) doesn't support __file__
   937     datapath = os.path.dirname(sys.executable)
   937     datapath = os.path.dirname(sys.executable)
   938 else:
   938 else:
   939     datapath = os.path.dirname(__file__)
   939     datapath = os.path.dirname(__file__)
   940 
   940 
       
   941 if not isinstance(datapath, bytes):
       
   942     datapath = pycompat.fsencode(datapath)
       
   943 
   941 i18n.setdatapath(datapath)
   944 i18n.setdatapath(datapath)
   942 
   945 
   943 _hgexecutable = None
   946 _hgexecutable = None
   944 
   947 
   945 def hgexecutable():
   948 def hgexecutable():