diff -r a8b17859684a -r 20a42325fdef mercurial/commandserver.py --- a/mercurial/commandserver.py Wed Aug 17 20:57:15 2016 -0700 +++ b/mercurial/commandserver.py Wed Nov 23 00:03:11 2016 +0530 @@ -21,6 +21,7 @@ from . import ( encoding, error, + pycompat, util, ) @@ -152,7 +153,7 @@ based stream to fout. """ def __init__(self, ui, repo, fin, fout): - self.cwd = os.getcwd() + self.cwd = pycompat.getcwd() # developer config: cmdserver.log logpath = ui.config("cmdserver", "log", None)