Mercurial > hg
diff mercurial/chgserver.py @ 40824:82210d88d814
commandserver: install logger to record server events through canonical API
The global commandserver.log() will be replaced with this.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 10 Nov 2018 19:00:17 +0900 |
parents | c93d046d4300 |
children | eaabcb689747 |
line wrap: on
line diff
--- a/mercurial/chgserver.py Sat Nov 10 18:19:34 2018 +0900 +++ b/mercurial/chgserver.py Sat Nov 10 19:00:17 2018 +0900 @@ -219,7 +219,7 @@ return chgui(srcui) -def _loadnewui(srcui, args): +def _loadnewui(srcui, args, cdebug): from . import dispatch # avoid cycle newui = srcui.__class__.load() @@ -247,8 +247,10 @@ path, newlui = dispatch._getlocal(newui, rpath, wd=cwd) extensions.populateui(newui) + commandserver.setuplogging(newui, fp=cdebug) if newui is not newlui: extensions.populateui(newlui) + commandserver.setuplogging(newlui, fp=cdebug) return (newui, newlui) @@ -423,7 +425,7 @@ args = self._readlist() try: - self.ui, lui = _loadnewui(self.ui, args) + self.ui, lui = _loadnewui(self.ui, args, self.cdebug) except error.ParseError as inst: dispatch._formatparse(self.ui.warn, inst) self.ui.flush()