equal
deleted
inserted
replaced
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(): |