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

login
register
mail settings
Submitter Jun Wu
Date March 16, 2016, 12:08 p.m.
Message ID <bc925c3acec1c4938f49.1458130089@x1c>
Download mbox | patch
Permalink /patch/13911/
State Accepted
Delegated to: Yuya Nishihara
Headers show

Comments

Jun Wu - March 16, 2016, 12:08 p.m.
# HG changeset patch
# User Jun Wu <quark@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.
Yuya Nishihara - March 16, 2016, 3:01 p.m.
On Wed, 16 Mar 2016 12:08:09 +0000, Jun Wu wrote:
> # HG changeset patch
> # User Jun Wu <quark@fb.com>
> # Date 1458129429 0
> #      Wed Mar 16 11:57:09 2016 +0000
> # Node ID bc925c3acec1c4938f49d623e797444d955eb59d
> # Parent  dfd5a6830ea7cd56909b6667c78ae122cc3a5aa1
> chgserver: do not keep repo object

Queued this, thanks. I'll revisit the other patches later.

Patch

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):