[PATCH] histedit: do not check experimental.histediting in extsetup

Yuya Nishihara yuya at tcha.org
Fri Mar 11 06:37:46 EST 2016


On Thu, 10 Mar 2016 16:23:58 +0000, Jun Wu wrote:
> On 03/10/2016 03:56 PM, Pierre-Yves David wrote:
> > But it is still in a global variable. If this is recomputed on the fly,
> > can't we keep it in the scope of the function?
> 
> It requires "ui" to compute. We don't pass "ui" down to the functions which
> actually need it. I don't think passing down the "ui" object (the source of
> truth) is a good idea.

I don't think it's bad to pass "ui" to geteditcomment() and parserules()
as these functions seem to be near the ui layer.

Mutating global variables are source of trouble because it hides data
dependencies and it mostly works even if you don't update the globals
correctly.


More information about the Mercurial-devel mailing list