Mercurial > hg
diff mercurial/chgserver.py @ 40875:e7110f44ee2d
commandserver: pass around option to hook repo instance creation
This is necessary to wrap a repo instance so the master process will be
notified on repo.close().
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Wed, 31 Oct 2018 21:57:11 +0900 |
parents | 25e9089c7686 |
children | cf8677cd7286 |
line wrap: on
line diff
--- a/mercurial/chgserver.py Sun Dec 09 19:40:54 2018 -0500 +++ b/mercurial/chgserver.py Wed Oct 31 21:57:11 2018 +0900 @@ -313,10 +313,11 @@ ] class chgcmdserver(commandserver.server): - def __init__(self, ui, repo, fin, fout, sock, hashstate, baseaddress): + def __init__(self, ui, repo, fin, fout, sock, prereposetups, + hashstate, baseaddress): super(chgcmdserver, self).__init__( _newchgui(ui, channeledsystem(fin, fout, 'S'), self.attachio), - repo, fin, fout) + repo, fin, fout, prereposetups) self.clientsock = sock self._ioattached = False self._oldios = [] # original (self.ch, ui.fp, fd) before "attachio" @@ -617,8 +618,8 @@ def newconnection(self): self._lastactive = time.time() - def createcmdserver(self, repo, conn, fin, fout): - return chgcmdserver(self.ui, repo, fin, fout, conn, + def createcmdserver(self, repo, conn, fin, fout, prereposetups): + return chgcmdserver(self.ui, repo, fin, fout, conn, prereposetups, self._hashstate, self._baseaddress) def chgunixservice(ui, repo, opts):