Show More
@@ -667,7 +667,7 b' def _getlocal(ui, rpath, wd=None):' | |||||
667 | """ |
|
667 | """ | |
668 | if wd is None: |
|
668 | if wd is None: | |
669 | try: |
|
669 | try: | |
670 |
wd = |
|
670 | wd = pycompat.getcwd() | |
671 | except OSError as e: |
|
671 | except OSError as e: | |
672 | raise error.Abort(_("error getting current working directory: %s") % |
|
672 | raise error.Abort(_("error getting current working directory: %s") % | |
673 | e.strerror) |
|
673 | e.strerror) |
@@ -43,6 +43,9 b' if ispy3:' | |||||
43 | osname = os.name.encode('ascii') |
|
43 | osname = os.name.encode('ascii') | |
44 | ospathsep = os.pathsep.encode('ascii') |
|
44 | ospathsep = os.pathsep.encode('ascii') | |
45 | ossep = os.sep.encode('ascii') |
|
45 | ossep = os.sep.encode('ascii') | |
|
46 | # os.getcwd() on Python 3 returns string, but it has os.getcwdb() which | |||
|
47 | # returns bytes. | |||
|
48 | getcwd = os.getcwdb | |||
46 |
|
49 | |||
47 | # TODO: .buffer might not exist if std streams were replaced; we'll need |
|
50 | # TODO: .buffer might not exist if std streams were replaced; we'll need | |
48 | # a silly wrapper to make a bytes stream backed by a unicode one. |
|
51 | # a silly wrapper to make a bytes stream backed by a unicode one. | |
@@ -110,6 +113,7 b' else:' | |||||
110 | stdout = sys.stdout |
|
113 | stdout = sys.stdout | |
111 | stderr = sys.stderr |
|
114 | stderr = sys.stderr | |
112 | sysargv = sys.argv |
|
115 | sysargv = sys.argv | |
|
116 | getcwd = os.getcwd | |||
113 |
|
117 | |||
114 | stringio = io.StringIO |
|
118 | stringio = io.StringIO | |
115 | empty = _queue.Empty |
|
119 | empty = _queue.Empty |
General Comments 0
You need to be logged in to leave comments.
Login now