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
--- 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