Patchwork D1986: wireprotoserver: remove lock references

login
register
mail settings
Submitter phabricator
Date Feb. 1, 2018, 11:12 p.m.
Message ID <differential-rev-PHID-DREV-fibhvaiq7jssn7qhondy-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/27177/
State Superseded
Headers show

Comments

phabricator - Feb. 1, 2018, 11:12 p.m.
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  AFAICT sshserver.lock is unused. The last caller of it disappeared
  in https://phab.mercurial-scm.org/rHG9f6e0e7ef82884e3ec66455dac7312820c2b35ce ~18 months ago as part of removing code to support
  ancient wire protocol commands. Let's remove some dead code.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D1986

AFFECTED FILES
  mercurial/wireprotoserver.py

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/wireprotoserver.py b/mercurial/wireprotoserver.py
--- a/mercurial/wireprotoserver.py
+++ b/mercurial/wireprotoserver.py
@@ -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 = {