[PATCH] chgserver: wrap ui without calling its constructor

Yuya Nishihara yuya at tcha.org
Sun Mar 13 11:52:56 EDT 2016

On Sun, 13 Mar 2016 15:10:08 +0000, Jun Wu wrote:
> On 03/13/2016 12:12 PM, Yuya Nishihara wrote:
> > Hmm, but you can't eliminate all of these copies, right? What's the benefit
> > to skip only one copy at chgcmdserver.__init__? It will soon be copied at
> > runcommand() anyway.
> Another patch will stop runcommand() from copying ui. It will make
> test-progress.t result better.

Can you send it first? It smells like a controversial patch. ;)

> > Well, if you want to change _newchgui() to _wrapchgui(), move _wrapchgui()
> > to uisetup(). That will make sure the class wrapping is processed only
> > once.
> I have considered this way in the first place. I didn't do it because
> _csystem is not ready at that time.
> Let's do it + start killing ui.copy (which I just found have filesystem race
> condition issues).

Or should I send patches that will remove chgui completely? I didn't write
them yet, but it should be possible. Basic idea is to move ui-layer code from
util.system() to ui.system(), and make ui._csystem swappable.

More information about the Mercurial-devel mailing list