Patchwork [1,of,4] chgserver: use ui.debug() to print server debug messages

login
register
mail settings
Submitter Yuya Nishihara
Date July 18, 2016, 1:53 p.m.
Message ID <913392f7d88719993f47.1468850015@mimosa>
Download mbox | patch
Permalink /patch/15936/
State Accepted
Headers show

Comments

Yuya Nishihara - July 18, 2016, 1:53 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1463822120 -32400
#      Sat May 21 18:15:20 2016 +0900
# Node ID 913392f7d88719993f4787e39ed0a039e812dc48
# Parent  953839de96ab574caa40557c542c262286c6287c
chgserver: use ui.debug() to print server debug messages

commandserver.log() is noop at this time because no client connection is
established.

Patch

diff --git a/hgext/chgserver.py b/hgext/chgserver.py
--- a/hgext/chgserver.py
+++ b/hgext/chgserver.py
@@ -582,10 +582,10 @@  class chgunixservicehandler(object):
 
     def shouldexit(self):
         if not self.issocketowner():
-            _log('%s is not owned, exiting.\n' % self.address)
+            self.ui.debug('%s is not owned, exiting.\n' % self.address)
             return True
         if time.time() - self.lastactive > self.idletimeout:
-            _log('being idle too long. exiting.\n')
+            self.ui.debug('being idle too long. exiting.\n')
             return True
         return False