[PATCH 5 of 5] chgserver: add a config option to preload repo

Yuya Nishihara yuya at tcha.org
Tue Mar 15 12:22:56 EDT 2016


On Mon, 14 Mar 2016 20:33:51 +0000, Jun Wu wrote:
> # HG changeset patch
> # User Jun Wu <quark at fb.com>
> # Date 1457986958 0
> #      Mon Mar 14 20:22:38 2016 +0000
> # Node ID a51d7eb2e998920b2f4c4f7114cb8450df05ec44
> # Parent  5569c3510113e4224cd630cf157a02646ce238d4
> chgserver: add a config option to preload repo
> 
> chgserver was designed to load repo per request to minimize the number of
> server processes and to be more confident. But it may also work with repo
> preloaded as well, which should be good for performance but is more risky
> in current situation due to repo.invalidateall and ui/config handling is
> not perfect yet.
> 
> This patch adds an experimental config option "chgserver.preloadrepo" and
> changes confighash and mtimehash to optionally include the repo directory.
> It will also change the default behavior to drop the repo object, which
> will solve the big issue that chg uses a wrong repo for users.

Can you split patches to first fix the issue spotted by dropping "--cwd /" ?

This isn't a trivial change, and I doubt if repo per server would go well.
I think chgserver will need own cache of multiple repositories per server.


More information about the Mercurial-devel mailing list