chg and uisetup

Jun Wu quark at fb.com
Wed Jul 13 11:09:32 EDT 2016


Excerpts from Yuya Nishihara's message of 2016-07-13 23:32:50 +0900:
>  4. run ui/extsetup and register commands, templates, etc. if there are
>     preloaded and enabled extensions

This is problematic, there are too many decorators to patch already and I
think there are also non-decorator side-effect patterns used in the wild.

The Python language is too free and developers can easily write code with
all kinds of side-effects. We will never be confident enough: we cannot
devel-warn them. And I can imagine developers yell at chg.

Just an example, I think this is a legit:

  from hgext import histedit
  @histedit.action
  ...

Patching histedit.action is a bit too much and does not worth it imo.

Therefore, I think the cost of possible multiple server processes is very
worth to eliminate the uncontrollable side-effect issue. For common users,
there is usually only one server process.


More information about the Mercurial-devel mailing list