commandserver: expand log path for convenience
authorYuya Nishihara <yuya@tcha.org>
Sat, 10 Nov 2018 19:27:47 +0900
changeset 40826 1617aa916d88
parent 40825 eaabcb689747
child 40827 d23fd01cc115
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
mercurial/commandserver.py
tests/test-chg.t
--- 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)
 
--- 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 <<EOF >> $HGRCPATH
+  $ cat <<'EOF' >> $HGRCPATH
   > [cmdserver]
   > log = $TESTTMP/server.log
   > EOF