[PATCH 1 of 3 V2] chgserver: do not keep repo object

Jun Wu quark at fb.com
Wed Mar 16 08:08:09 EDT 2016


# HG changeset patch
# User Jun Wu <quark at fb.com>
# Date 1458129429 0
#      Wed Mar 16 11:57:09 2016 +0000
# Node ID bc925c3acec1c4938f49d623e797444d955eb59d
# Parent  dfd5a6830ea7cd56909b6667c78ae122cc3a5aa1
chgserver: do not keep repo object

The current chgserver design is to use one server to handle multiple repos
which has same [extensions] config. Previously the client uses --cwd / to
avoid creating a repo object. Now we need to set repo to None before we
have code to make "serve" command norepo when it's chg.

diff --git a/hgext/chgserver.py b/hgext/chgserver.py
--- a/hgext/chgserver.py
+++ b/hgext/chgserver.py
@@ -628,6 +628,7 @@
 
 class chgunixservice(commandserver.unixservice):
     def init(self):
+        self.repo = None
         self._inithashstate()
         class cls(AutoExitMixIn, SocketServer.ForkingMixIn,
                   SocketServer.UnixStreamServer):


More information about the Mercurial-devel mailing list