comparison mercurial/wireprotoserver.py @ 35868:5a9ff8c20123

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
author Gregory Szorc <gregory.szorc@gmail.com>
date Wed, 31 Jan 2018 11:19:05 -0800
parents d7cce6df65bb
children c9faf3a2eef1
comparison
equal deleted inserted replaced
35867:d7cce6df65bb 35868:5a9ff8c20123
248 248
249 class sshserver(abstractserverproto): 249 class sshserver(abstractserverproto):
250 def __init__(self, ui, repo): 250 def __init__(self, ui, repo):
251 self.ui = ui 251 self.ui = ui
252 self.repo = repo 252 self.repo = repo
253 self.lock = None
254 self.fin = ui.fin 253 self.fin = ui.fin
255 self.fout = ui.fout 254 self.fout = ui.fout
256 self.name = 'ssh' 255 self.name = 'ssh'
257 256
258 hook.redirect(True) 257 hook.redirect(True)
319 self.ui.ferr.flush() 318 self.ui.ferr.flush()
320 self.fout.write('\n') 319 self.fout.write('\n')
321 self.fout.flush() 320 self.fout.flush()
322 321
323 def serve_forever(self): 322 def serve_forever(self):
324 try: 323 while self.serve_one():
325 while self.serve_one(): 324 pass
326 pass
327 finally:
328 if self.lock is not None:
329 self.lock.release()
330 sys.exit(0) 325 sys.exit(0)
331 326
332 handlers = { 327 handlers = {
333 str: sendresponse, 328 str: sendresponse,
334 wireproto.streamres: sendstream, 329 wireproto.streamres: sendstream,