Mercurial > public > mercurial-scm > hg
comparison mercurial/commandserver.py @ 30519:20a42325fdef
py3: use pycompat.getcwd() instead of os.getcwd()
We have pycompat.getcwd() which returns bytes path on Python 3. This patch
changes most of the occurences of the os.getcwd() with pycompat one.
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Wed, 23 Nov 2016 00:03:11 +0530 |
parents | dd539e2d89aa |
children | a95fc01aaffe |
comparison
equal
deleted
inserted
replaced
30518:a8b17859684a | 30519:20a42325fdef |
---|---|
19 | 19 |
20 from .i18n import _ | 20 from .i18n import _ |
21 from . import ( | 21 from . import ( |
22 encoding, | 22 encoding, |
23 error, | 23 error, |
24 pycompat, | |
24 util, | 25 util, |
25 ) | 26 ) |
26 | 27 |
27 logfile = None | 28 logfile = None |
28 | 29 |
150 """ | 151 """ |
151 Listens for commands on fin, runs them and writes the output on a channel | 152 Listens for commands on fin, runs them and writes the output on a channel |
152 based stream to fout. | 153 based stream to fout. |
153 """ | 154 """ |
154 def __init__(self, ui, repo, fin, fout): | 155 def __init__(self, ui, repo, fin, fout): |
155 self.cwd = os.getcwd() | 156 self.cwd = pycompat.getcwd() |
156 | 157 |
157 # developer config: cmdserver.log | 158 # developer config: cmdserver.log |
158 logpath = ui.config("cmdserver", "log", None) | 159 logpath = ui.config("cmdserver", "log", None) |
159 if logpath: | 160 if logpath: |
160 global logfile | 161 global logfile |