# HG changeset patch # User Yuya Nishihara # Date 1541845667 -32400 # Node ID 1617aa916d8851a344a870bda273928a11b01541 # Parent eaabcb689747c7fc99628ec8847a77d217d124f7 commandserver: expand log path for convenience This allows us to set the log path relative to $XDG_RUNTIME_DIR, for instance. [cmdserver] log = $XDG_RUNTIME_DIR/chg/server.log diff -r eaabcb689747 -r 1617aa916d88 mercurial/commandserver.py --- a/mercurial/commandserver.py Sat Nov 10 19:09:37 2018 +0900 +++ b/mercurial/commandserver.py Sat Nov 10 19:27:47 2018 +0900 @@ -367,7 +367,7 @@ 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 -r eaabcb689747 -r 1617aa916d88 tests/test-chg.t --- a/tests/test-chg.t Sat Nov 10 19:09:37 2018 +0900 +++ b/tests/test-chg.t Sat Nov 10 19:27:47 2018 +0900 @@ -1,6 +1,6 @@ #require chg - $ cat <> $HGRCPATH + $ cat <<'EOF' >> $HGRCPATH > [cmdserver] > log = $TESTTMP/server.log > EOF