[PATCH 4 of 4] chgserver: move wrapchgui to runcommand

Augie Fackler raf at durin42.com
Wed Dec 21 12:39:33 EST 2016


> On Dec 20, 2016, at 11:46, Jun Wu <quark at fb.com> wrote:
> 
> The pager API has 2 levels:
> 
>  - high-level (pagecmd): decide the command of the pager, call low-level
>  - low-level (_runpager): accept a command and run it unconditionally
> 
> I think ui.pager() should be high-level, and chg only wants to replace the
> low-level one.
> 
> Therefore a possible API is:
> 
>  - ui.pager() as the new high-level API which parses config and calls
>    low-level method.
>  - ui._runpager(pagercmd) as the low-level API which will be implemented
>    differently by chg.
> 
> A possible approach is:
> 
>  1. Move pager._runpager to uimod.ui._runpager
>  2. Override ui._runpager in chgui
>  3. Move part of pagecmd to uimod.ui.pager (or startpager if we plan to
>     have an endpager in the future)
>  4. Revisit when to call ui.pager (complex)
> 
> 1 and 2 are easy and related to chg. 3 does not block chg refactoring and is
> simple enough so I could help by the way. 4 is a complex core part of the
> pager plan but I'd like to avoid as it has nothing to do with chg.

This matches my understanding of where we probably have to go for the pager work.

I'm not sure if we should plan to make the pager exit-able, but that depends on the architecture we use for paging, which I haven't given much thought lately.


More information about the Mercurial-devel mailing list