equal
deleted
inserted
replaced
483 |
483 |
484 pollinterval = 1 # [sec] |
484 pollinterval = 1 # [sec] |
485 |
485 |
486 def __init__(self, ui): |
486 def __init__(self, ui): |
487 self.ui = ui |
487 self.ui = ui |
488 self._idletimeout = ui.configint('chgserver', 'idletimeout', 3600) |
488 self._idletimeout = ui.configint('chgserver', 'idletimeout') |
489 self._lastactive = time.time() |
489 self._lastactive = time.time() |
490 |
490 |
491 def bindsocket(self, sock, address): |
491 def bindsocket(self, sock, address): |
492 self._inithashstate(address) |
492 self._inithashstate(address) |
493 self._checkextensions() |
493 self._checkextensions() |
495 self._createsymlink() |
495 self._createsymlink() |
496 # no "listening at" message should be printed to simulate hg behavior |
496 # no "listening at" message should be printed to simulate hg behavior |
497 |
497 |
498 def _inithashstate(self, address): |
498 def _inithashstate(self, address): |
499 self._baseaddress = address |
499 self._baseaddress = address |
500 if self.ui.configbool('chgserver', 'skiphash', False): |
500 if self.ui.configbool('chgserver', 'skiphash'): |
501 self._hashstate = None |
501 self._hashstate = None |
502 self._realaddress = address |
502 self._realaddress = address |
503 return |
503 return |
504 self._hashstate = hashstate.fromui(self.ui) |
504 self._hashstate = hashstate.fromui(self.ui) |
505 self._realaddress = _hashaddress(address, self._hashstate.confighash) |
505 self._realaddress = _hashaddress(address, self._hashstate.confighash) |