mercurial/commandserver.py
changeset 41284 b0e3f2d7c143
parent 40999 dcac24ec935b
child 43076 2372284d9457
equal deleted inserted replaced
41283:4948b327d3b9 41284:b0e3f2d7c143
   397 
   397 
   398     def run(self):
   398     def run(self):
   399         ui = self.ui
   399         ui = self.ui
   400         # redirect stdio to null device so that broken extensions or in-process
   400         # redirect stdio to null device so that broken extensions or in-process
   401         # hooks will never cause corruption of channel protocol.
   401         # hooks will never cause corruption of channel protocol.
   402         with procutil.protectedstdio(ui.fin, ui.fout) as (fin, fout):
   402         with ui.protectedfinout() as (fin, fout):
   403             sv = server(ui, self.repo, fin, fout)
   403             sv = server(ui, self.repo, fin, fout)
   404             try:
   404             try:
   405                 return sv.serve()
   405                 return sv.serve()
   406             finally:
   406             finally:
   407                 sv.cleanup()
   407                 sv.cleanup()