[PATCH] chgserver: wrap ui without calling its constructor

Jun Wu quark at fb.com
Mon Mar 14 10:09:00 EDT 2016


On 03/14/2016 02:02 PM, Yuya Nishihara wrote:
> My idea is somewhat different:
>
>    ui._system = util.system  # default
>    ui._system = channeledsystem(fin, fout, 'S')  # chg
>
> I haven't started writing the patches yet for two reasons:
>
>   a) I considered it would be a pure clean-up series.
>   b) I might want to extend the 'S' channel to handle pager request. If the
>      pager extension gets into the core, it might have more precise logic when
>      to start a pager, such as ui.startpager(). Current "getpager" command can't
>      handle such situation.

Looks better. The patch is harder than I expected because we still have
the csystem scope issue. _renewui currently needs to create new ui objects
and it cannot access the intended default csystem. It seems I have to start the
ui/config (at least config) refactoring before making _renewui better.




More information about the Mercurial-devel mailing list