diff mercurial/lsprofcalltree.py @ 26135:edfb4d3b9672

hgweb: move some config options to requestcontext Various config options from the repository were stored on the hgweb instance. While unlikely, there could be race conditions between a new request updating these values and an in-flight request seeing both old and new values, leading to weird results. We move some of options/attributes from hgweb to requestcontext. As part of this, we establish config* helpers on requestcontext. As part of the move, we changed int() casts to configint() calls. The int() usage likely predates the existence of configint(). We also removed config option updating from once every refresh to every request. I don't believe obtaining config options is expensive enough to warrant only doing when the repository has changed. The excessive use of object.__setattr__ is unfortunate. But it will eventually disappear once the proxy is no longer necessary.
author Gregory Szorc <gregory.szorc@gmail.com>
date Sat, 22 Aug 2015 15:02:41 -0700
parents beae42f3d93b
children 071af8d385a9
line wrap: on
line diff