Mercurial > hg
changeset 29597:581c0c7cb258
chgserver: refactor initialization of real/base addresses
Instead of overwriting self.address, calculate it from the address argument,
which is the base address.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 22 May 2016 14:06:37 +0900 |
parents | 71c197d82b7e |
children | a67398726747 |
files | hgext/chgserver.py |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/chgserver.py Sun May 22 14:05:34 2016 +0900 +++ b/hgext/chgserver.py Sun May 22 14:06:37 2016 +0900 @@ -546,19 +546,19 @@ self.lastactive = time.time() def bindsocket(self, sock, address): - self.address = address - self._inithashstate() + self._inithashstate(address) self._checkextensions() self._bind(sock) self._createsymlink() - def _inithashstate(self): - self.baseaddress = self.address + def _inithashstate(self, address): + self.baseaddress = address if self.ui.configbool('chgserver', 'skiphash', False): self.hashstate = None + self.address = address return self.hashstate = hashstate.fromui(self.ui) - self.address = _hashaddress(self.address, self.hashstate.confighash) + self.address = _hashaddress(address, self.hashstate.confighash) def _checkextensions(self): if not self.hashstate: