Mercurial > public > mercurial-scm > hg
comparison mercurial/commandserver.py @ 39818:24e493ec2229
py3: rename pycompat.getcwd() to encoding.getcwd() (API)
We need to avoid os.getcwdb() on Windows to avoid DeprecationWarnings, and we
need encoding.strtolocal() to encode the result of os.getcwd().
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Fri, 21 Sep 2018 19:48:23 -0400 |
parents | afc4ad706f9c |
children | efbf7de09d2a |
comparison
equal
deleted
inserted
replaced
39817:94c25f694ec3 | 39818:24e493ec2229 |
---|---|
24 | 24 |
25 from .i18n import _ | 25 from .i18n import _ |
26 from . import ( | 26 from . import ( |
27 encoding, | 27 encoding, |
28 error, | 28 error, |
29 pycompat, | |
30 util, | 29 util, |
31 ) | 30 ) |
32 from .utils import ( | 31 from .utils import ( |
33 procutil, | 32 procutil, |
34 ) | 33 ) |
159 """ | 158 """ |
160 Listens for commands on fin, runs them and writes the output on a channel | 159 Listens for commands on fin, runs them and writes the output on a channel |
161 based stream to fout. | 160 based stream to fout. |
162 """ | 161 """ |
163 def __init__(self, ui, repo, fin, fout): | 162 def __init__(self, ui, repo, fin, fout): |
164 self.cwd = pycompat.getcwd() | 163 self.cwd = encoding.getcwd() |
165 | 164 |
166 # developer config: cmdserver.log | 165 # developer config: cmdserver.log |
167 logpath = ui.config("cmdserver", "log") | 166 logpath = ui.config("cmdserver", "log") |
168 if logpath: | 167 if logpath: |
169 global logfile | 168 global logfile |