Mercurial > public > mercurial-scm > hg
comparison mercurial/commandserver.py @ 40826:1617aa916d88
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
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 10 Nov 2018 19:27:47 +0900 |
parents | eaabcb689747 |
children | d23fd01cc115 |
comparison
equal
deleted
inserted
replaced
40825:eaabcb689747 | 40826:1617aa916d88 |
---|---|
365 if logpath == b'-' and fp: | 365 if logpath == b'-' and fp: |
366 logger = loggingutil.fileobjectlogger(fp, tracked) | 366 logger = loggingutil.fileobjectlogger(fp, tracked) |
367 elif logpath == b'-': | 367 elif logpath == b'-': |
368 logger = loggingutil.fileobjectlogger(ui.ferr, tracked) | 368 logger = loggingutil.fileobjectlogger(ui.ferr, tracked) |
369 else: | 369 else: |
370 logpath = os.path.abspath(logpath) | 370 logpath = os.path.abspath(util.expandpath(logpath)) |
371 vfs = vfsmod.vfs(os.path.dirname(logpath)) | 371 vfs = vfsmod.vfs(os.path.dirname(logpath)) |
372 logger = loggingutil.filelogger(vfs, os.path.basename(logpath), tracked) | 372 logger = loggingutil.filelogger(vfs, os.path.basename(logpath), tracked) |
373 | 373 |
374 targetuis = {ui} | 374 targetuis = {ui} |
375 if repo: | 375 if repo: |