changeset 40588:9683dfb6f13a

commandserver: fix reference before assignment error in pipeservice cleanup Spotted by the next patch.
author Yuya Nishihara <yuya@tcha.org>
date Wed, 07 Nov 2018 22:37:51 +0900
parents 5542bc9125c9
children 054d0fcba2c4
files mercurial/commandserver.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commandserver.py	Sun Jan 18 18:43:23 2015 +0900
+++ b/mercurial/commandserver.py	Wed Nov 07 22:37:51 2018 +0900
@@ -320,8 +320,8 @@
         # redirect stdio to null device so that broken extensions or in-process
         # hooks will never cause corruption of channel protocol.
         with procutil.protectedstdio(ui.fin, ui.fout) as (fin, fout):
+            sv = server(ui, self.repo, fin, fout)
             try:
-                sv = server(ui, self.repo, fin, fout)
                 return sv.serve()
             finally:
                 sv.cleanup()