mercurial/pycompat.py
changeset 30623 c6026c20a3ce
parent 30579 fbc3f73dc802
child 30624 a82a6eee2613
--- a/mercurial/pycompat.py	Sat Dec 17 23:55:25 2016 +0530
+++ b/mercurial/pycompat.py	Sun Dec 18 00:44:21 2016 +0530
@@ -44,6 +44,9 @@
     osname = os.name.encode('ascii')
     ospathsep = os.pathsep.encode('ascii')
     ossep = os.sep.encode('ascii')
+    osaltsep = os.altsep
+    if osaltsep:
+        osaltsep = osaltsep.encode('ascii')
     # os.getcwd() on Python 3 returns string, but it has os.getcwdb() which
     # returns bytes.
     getcwd = os.getcwdb
@@ -145,6 +148,7 @@
     osname = os.name
     ospathsep = os.pathsep
     ossep = os.sep
+    osaltsep = os.altsep
     stdin = sys.stdin
     stdout = sys.stdout
     stderr = sys.stderr