# HG changeset patch # User Yuya Nishihara # Date 1542538553 -32400 # Node ID 25e9089c7686be81d3500432be008ef08a142487 # Parent d23fd01cc1156fcb856299e009796066fbde15db commandserver: turn server debug messages into logs They were ui.debug() just because commandserver.log() was noop if no client connected. diff -r d23fd01cc115 -r 25e9089c7686 mercurial/chgserver.py --- a/mercurial/chgserver.py Sun Nov 18 19:47:04 2018 +0900 +++ b/mercurial/chgserver.py Sun Nov 18 19:55:53 2018 +0900 @@ -606,10 +606,11 @@ def shouldexit(self): if not self._issocketowner(): - self.ui.debug('%s is not owned, exiting.\n' % self._realaddress) + self.ui.log(b'chgserver', b'%s is not owned, exiting.\n', + self._realaddress) return True if time.time() - self._lastactive > self._idletimeout: - self.ui.debug('being idle too long. exiting.\n') + self.ui.log(b'chgserver', b'being idle too long. exiting.\n') return True return False diff -r d23fd01cc115 -r 25e9089c7686 mercurial/commandserver.py --- a/mercurial/commandserver.py Sun Nov 18 19:47:04 2018 +0900 +++ b/mercurial/commandserver.py Sun Nov 18 19:55:53 2018 +0900 @@ -573,7 +573,8 @@ pid = os.fork() if pid: try: - self.ui.debug('forked worker process (pid=%d)\n' % pid) + self.ui.log(b'cmdserver', + b'forked worker process (pid=%d)\n', pid) self._workerpids.add(pid) h.newconnection() finally: @@ -610,7 +611,7 @@ if pid == 0: # no waitable child processes return - self.ui.debug('worker process exited (pid=%d)\n' % pid) + self.ui.log(b'cmdserver', b'worker process exited (pid=%d)\n', pid) self._workerpids.discard(pid) def _runworker(self, conn): diff -r d23fd01cc115 -r 25e9089c7686 tests/test-chg.t --- a/tests/test-chg.t Sun Nov 18 19:47:04 2018 +0900 +++ b/tests/test-chg.t Sun Nov 18 19:55:53 2018 +0900 @@ -230,9 +230,7 @@ preserved: $ cat log/server.log.1 log/server.log | tail -10 | filterlog - YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ... - YYYY/MM/DD HH:MM:SS (PID)> validate: [] - YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ... + YYYY/MM/DD HH:MM:SS (PID)> forked worker process (pid=...) YYYY/MM/DD HH:MM:SS (PID)> setprocname: ... YYYY/MM/DD HH:MM:SS (PID)> received fds: ... YYYY/MM/DD HH:MM:SS (PID)> chdir to '$TESTTMP/extreload' @@ -240,3 +238,5 @@ YYYY/MM/DD HH:MM:SS (PID)> setenv: ... YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ... YYYY/MM/DD HH:MM:SS (PID)> validate: [] + YYYY/MM/DD HH:MM:SS (PID)> worker process exited (pid=...) + YYYY/MM/DD HH:MM:SS (PID)> $TESTTMP/extreload/chgsock/server-... is not owned, exiting.