Show More
@@ -651,11 +651,8 b' class chgunixservice(commandserver.unixs' | |||||
651 | os.symlink(os.path.basename(self.address), tempaddress) |
|
651 | os.symlink(os.path.basename(self.address), tempaddress) | |
652 | util.rename(tempaddress, self.baseaddress) |
|
652 | util.rename(tempaddress, self.baseaddress) | |
653 |
|
653 | |||
654 |
def |
|
654 | def _cleanup(self): | |
655 | try: |
|
655 | self.server.unlinksocketfile() | |
656 | self.server.serve_forever() |
|
|||
657 | finally: |
|
|||
658 | self.server.unlinksocketfile() |
|
|||
659 |
|
656 | |||
660 | def uisetup(ui): |
|
657 | def uisetup(ui): | |
661 | commandserver._servicemap['chgunix'] = chgunixservice |
|
658 | commandserver._servicemap['chgunix'] = chgunixservice |
@@ -403,11 +403,14 b' class unixservice(object):' | |||||
403 | self.ui.status(_('listening at %s\n') % self.address) |
|
403 | self.ui.status(_('listening at %s\n') % self.address) | |
404 | self.ui.flush() # avoid buffering of status message |
|
404 | self.ui.flush() # avoid buffering of status message | |
405 |
|
405 | |||
|
406 | def _cleanup(self): | |||
|
407 | os.unlink(self.address) | |||
|
408 | ||||
406 | def run(self): |
|
409 | def run(self): | |
407 | try: |
|
410 | try: | |
408 | self.server.serve_forever() |
|
411 | self.server.serve_forever() | |
409 | finally: |
|
412 | finally: | |
410 |
|
|
413 | self._cleanup() | |
411 |
|
414 | |||
412 | _servicemap = { |
|
415 | _servicemap = { | |
413 | 'pipe': pipeservice, |
|
416 | 'pipe': pipeservice, |
General Comments 0
You need to be logged in to leave comments.
Login now