Mercurial > public > mercurial-scm > hg
comparison mercurial/pycompat.py @ 36647:052351e3e1cd
py3: make os.pardir a bytes
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 03 Mar 2018 12:34:35 -0500 |
parents | e2b87e19c6ef |
children | 6585ac350fd9 |
comparison
equal
deleted
inserted
replaced
36646:463df2986814 | 36647:052351e3e1cd |
---|---|
49 fsencode = os.fsencode | 49 fsencode = os.fsencode |
50 fsdecode = os.fsdecode | 50 fsdecode = os.fsdecode |
51 oslinesep = os.linesep.encode('ascii') | 51 oslinesep = os.linesep.encode('ascii') |
52 osname = os.name.encode('ascii') | 52 osname = os.name.encode('ascii') |
53 ospathsep = os.pathsep.encode('ascii') | 53 ospathsep = os.pathsep.encode('ascii') |
54 ospardir = os.pardir.encode('ascii') | |
54 ossep = os.sep.encode('ascii') | 55 ossep = os.sep.encode('ascii') |
55 osaltsep = os.altsep | 56 osaltsep = os.altsep |
56 if osaltsep: | 57 if osaltsep: |
57 osaltsep = osaltsep.encode('ascii') | 58 osaltsep = osaltsep.encode('ascii') |
58 # os.getcwd() on Python 3 returns string, but it has os.getcwdb() which | 59 # os.getcwd() on Python 3 returns string, but it has os.getcwdb() which |
321 byteskwargs = identity | 322 byteskwargs = identity |
322 | 323 |
323 oslinesep = os.linesep | 324 oslinesep = os.linesep |
324 osname = os.name | 325 osname = os.name |
325 ospathsep = os.pathsep | 326 ospathsep = os.pathsep |
327 ospardir = os.pardir | |
326 ossep = os.sep | 328 ossep = os.sep |
327 osaltsep = os.altsep | 329 osaltsep = os.altsep |
328 stdin = sys.stdin | 330 stdin = sys.stdin |
329 stdout = sys.stdout | 331 stdout = sys.stdout |
330 stderr = sys.stderr | 332 stderr = sys.stderr |