diff --git a/mercurial/commandserver.py b/mercurial/commandserver.py --- a/mercurial/commandserver.py +++ b/mercurial/commandserver.py @@ -367,7 +367,7 @@ def setuplogging(ui, repo=None, fp=None) elif logpath == b'-': logger = loggingutil.fileobjectlogger(ui.ferr, tracked) else: - logpath = os.path.abspath(logpath) + logpath = os.path.abspath(util.expandpath(logpath)) vfs = vfsmod.vfs(os.path.dirname(logpath)) logger = loggingutil.filelogger(vfs, os.path.basename(logpath), tracked) diff --git a/tests/test-chg.t b/tests/test-chg.t --- a/tests/test-chg.t +++ b/tests/test-chg.t @@ -1,6 +1,6 @@ #require chg - $ cat <> $HGRCPATH + $ cat <<'EOF' >> $HGRCPATH > [cmdserver] > log = $TESTTMP/server.log > EOF