diff mercurial/commandserver.py @ 30516:dd539e2d89aa

server: move service table and factory from commandserver This is necessary to solve future dependency cycle between commandserver.py and chgserver.py. 'cmd' prefix is added to table and function names to avoid conflicts with hgweb.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 15 Oct 2016 13:57:17 +0900
parents 39d13b8c101d
children 20a42325fdef
line wrap: on
line diff
--- a/mercurial/commandserver.py	Sat Oct 15 13:47:43 2016 +0900
+++ b/mercurial/commandserver.py	Sat Oct 15 13:57:17 2016 +0900
@@ -529,15 +529,3 @@
             _serverequest(self.ui, self.repo, conn, h.createcmdserver)
         finally:
             gc.collect()  # trigger __del__ since worker process uses os._exit
-
-_servicemap = {
-    'pipe': pipeservice,
-    'unix': unixforkingservice,
-    }
-
-def createservice(ui, repo, opts):
-    mode = opts['cmdserver']
-    try:
-        return _servicemap[mode](ui, repo, opts)
-    except KeyError:
-        raise error.Abort(_('unknown mode %s') % mode)