[PATCH] chgserver: use global ui instead of repo ui for dispatch.request.ui

Jun Wu quark at fb.com
Sun Mar 20 13:59:24 EDT 2016


On 03/20/2016 09:13 AM, Yuya Nishihara wrote:
> Got pyflakes error. I'll fix this in flight and push to the clowncopter, thanks.

Sorry. I thought there was only one place calling it and did the rename
without thinking twice. I will improve my workflow to make sure test-check* are
always executed no matter how trivial the change is, right now.

> This assumes that the initial self.hashstate is calculated from repo.ui, which
> implies self.ui was initially a repo.ui (~= lui).

Yes. It looks a bit strange now.

> If we change "hg serve --cmdserver chgunix" not to load repo, we'll have to
> get "lui" in some way to calculate the initial hash.

Since repo config may have [extensions], it must be loaded. While we can skip
constructing the repo object.

An explicit _loadnewui at chgunixservice.init may help to clarify how the code
works, at the cost of 0.01 seconds for startup time. Alternatively, putting
some comments there may also help.


More information about the Mercurial-devel mailing list