Show More
@@ -451,7 +451,10 b' class chgcmdserver(commandserver.server)' | |||||
451 | if newhash.mtimehash != self.hashstate.mtimehash: |
|
451 | if newhash.mtimehash != self.hashstate.mtimehash: | |
452 | addr = _hashaddress(self.baseaddress, self.hashstate.confighash) |
|
452 | addr = _hashaddress(self.baseaddress, self.hashstate.confighash) | |
453 | insts.append('unlink %s' % addr) |
|
453 | insts.append('unlink %s' % addr) | |
454 | insts.append('reconnect') |
|
454 | # mtimehash is empty if one or more extensions fail to load. | |
|
455 | # to be compatible with hg, still serve the client this time. | |||
|
456 | if self.hashstate.mtimehash: | |||
|
457 | insts.append('reconnect') | |||
455 | if newhash.confighash != self.hashstate.confighash: |
|
458 | if newhash.confighash != self.hashstate.confighash: | |
456 | addr = _hashaddress(self.baseaddress, newhash.confighash) |
|
459 | addr = _hashaddress(self.baseaddress, newhash.confighash) | |
457 | insts.append('redirect %s' % addr) |
|
460 | insts.append('redirect %s' % addr) | |
@@ -636,6 +639,7 b' class AutoExitMixIn: # use old-style to' | |||||
636 | class chgunixservice(commandserver.unixservice): |
|
639 | class chgunixservice(commandserver.unixservice): | |
637 | def init(self): |
|
640 | def init(self): | |
638 | self._inithashstate() |
|
641 | self._inithashstate() | |
|
642 | self._checkextensions() | |||
639 | class cls(AutoExitMixIn, SocketServer.ForkingMixIn, |
|
643 | class cls(AutoExitMixIn, SocketServer.ForkingMixIn, | |
640 | SocketServer.UnixStreamServer): |
|
644 | SocketServer.UnixStreamServer): | |
641 | ui = self.ui |
|
645 | ui = self.ui | |
@@ -656,6 +660,15 b' class chgunixservice(commandserver.unixs' | |||||
656 | self.hashstate = hashstate.fromui(self.ui) |
|
660 | self.hashstate = hashstate.fromui(self.ui) | |
657 | self.address = _hashaddress(self.address, self.hashstate.confighash) |
|
661 | self.address = _hashaddress(self.address, self.hashstate.confighash) | |
658 |
|
662 | |||
|
663 | def _checkextensions(self): | |||
|
664 | if not self.hashstate: | |||
|
665 | return | |||
|
666 | if extensions.notloaded(): | |||
|
667 | # one or more extensions failed to load. mtimehash becomes | |||
|
668 | # meaningless because we do not know the paths of those extensions. | |||
|
669 | # set mtimehash to an illegal hash value to invalidate the server. | |||
|
670 | self.hashstate.mtimehash = '' | |||
|
671 | ||||
659 | def _createsymlink(self): |
|
672 | def _createsymlink(self): | |
660 | if self.baseaddress == self.address: |
|
673 | if self.baseaddress == self.address: | |
661 | return |
|
674 | return |
General Comments 0
You need to be logged in to leave comments.
Login now