chgserver: drop repo at chgunixservice.__init__()
Since it isn't expensive operation, we don't have to delay it to init().
--- a/hgext/chgserver.py Sat May 21 16:52:04 2016 +0900
+++ b/hgext/chgserver.py Sat May 21 17:06:39 2016 +0900
@@ -606,11 +606,13 @@
raise
class chgunixservice(commandserver.unixservice):
- def init(self):
- if self.repo:
+ def __init__(self, ui, repo, opts):
+ super(chgunixservice, self).__init__(ui, repo=None, opts=opts)
+ if repo:
# one chgserver can serve multiple repos. drop repo infomation
self.ui.setconfig('bundle', 'mainreporoot', '', 'repo')
- self.repo = None
+
+ def init(self):
self._inithashstate()
self._checkextensions()
class cls(AutoExitMixIn, socketserver.ForkingMixIn,