mercurial/util.py
changeset 30301 8321b083a83d
parent 30265 6a8aff737a17
child 30309 4b1af1c867fa
--- a/mercurial/util.py	Sun Nov 06 03:12:40 2016 +0530
+++ b/mercurial/util.py	Sun Nov 06 12:18:23 2016 +0900
@@ -938,6 +938,9 @@
 else:
     datapath = os.path.dirname(__file__)
 
+if not isinstance(datapath, bytes):
+    datapath = pycompat.fsencode(datapath)
+
 i18n.setdatapath(datapath)
 
 _hgexecutable = None