Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/chgserver.py @ 40846:25e9089c7686
commandserver: turn server debug messages into logs
They were ui.debug() just because commandserver.log() was noop if no client
connected.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 18 Nov 2018 19:55:53 +0900 |
parents | eaabcb689747 |
children | e7110f44ee2d |
comparison
equal
deleted
inserted
replaced
40845:d23fd01cc115 | 40846:25e9089c7686 |
---|---|
604 # the client will start a new server on demand. | 604 # the client will start a new server on demand. |
605 util.tryunlink(self._realaddress) | 605 util.tryunlink(self._realaddress) |
606 | 606 |
607 def shouldexit(self): | 607 def shouldexit(self): |
608 if not self._issocketowner(): | 608 if not self._issocketowner(): |
609 self.ui.debug('%s is not owned, exiting.\n' % self._realaddress) | 609 self.ui.log(b'chgserver', b'%s is not owned, exiting.\n', |
610 self._realaddress) | |
610 return True | 611 return True |
611 if time.time() - self._lastactive > self._idletimeout: | 612 if time.time() - self._lastactive > self._idletimeout: |
612 self.ui.debug('being idle too long. exiting.\n') | 613 self.ui.log(b'chgserver', b'being idle too long. exiting.\n') |
613 return True | 614 return True |
614 return False | 615 return False |
615 | 616 |
616 def newconnection(self): | 617 def newconnection(self): |
617 self._lastactive = time.time() | 618 self._lastactive = time.time() |