wireprotoserver: remove lock references
authorGregory Szorc <gregory.szorc@gmail.com>
Wed, 31 Jan 2018 11:19:05 -0800
changeset 35868 5a9ff8c20123
parent 35867 d7cce6df65bb
child 35869 c9faf3a2eef1
wireprotoserver: remove lock references AFAICT sshserver.lock is unused. The last caller of it disappeared in 9f6e0e7ef828 ~18 months ago as part of removing code to support ancient wire protocol commands. Let's remove some dead code. Differential Revision: https://phab.mercurial-scm.org/D1986
mercurial/wireprotoserver.py
--- a/mercurial/wireprotoserver.py	Wed Jan 31 11:17:41 2018 -0800
+++ b/mercurial/wireprotoserver.py	Wed Jan 31 11:19:05 2018 -0800
@@ -250,7 +250,6 @@
     def __init__(self, ui, repo):
         self.ui = ui
         self.repo = repo
-        self.lock = None
         self.fin = ui.fin
         self.fout = ui.fout
         self.name = 'ssh'
@@ -321,12 +320,8 @@
         self.fout.flush()
 
     def serve_forever(self):
-        try:
-            while self.serve_one():
-                pass
-        finally:
-            if self.lock is not None:
-                self.lock.release()
+        while self.serve_one():
+            pass
         sys.exit(0)
 
     handlers = {