[PATCH 3 of 4] chgserver: drop repo at chgunixservice.__init__()
Yuya Nishihara
yuya at tcha.org
Wed Jul 13 12:09:34 UTC 2016
# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1463817999 -32400
# Sat May 21 17:06:39 2016 +0900
# Node ID 5bd15cd2fed4991214c460875d41a88c8919a829
# Parent 5897fd557178c4b39349a0abd52a1ef5ade1702b
chgserver: drop repo at chgunixservice.__init__()
Since it isn't expensive operation, we don't have to delay it to init().
diff --git a/hgext/chgserver.py b/hgext/chgserver.py
--- a/hgext/chgserver.py
+++ b/hgext/chgserver.py
@@ -606,11 +606,13 @@ class AutoExitMixIn: # use old-style to
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,
More information about the Mercurial-devel
mailing list