[PATCH 2 of 9] chgserver: add a top-level run method

Jun Wu quark at fb.com
Sun Nov 20 01:14:11 EST 2016


Excerpts from Yuya Nishihara's message of 2016-11-20 13:13:14 +0900:
> On Sat, 19 Nov 2016 15:05:55 +0000, Jun Wu wrote:
> > Excerpts from Yuya Nishihara's message of 2016-11-19 18:09:18 +0900:
> > > I'm in favor of going through dispatch.dispatch() with some special treatments
> > > for chg, but you might be right in that it would be unnecessary complicated.
> > > So I'll queue V2 even if it has a top-level run().
> > 
> > I think some dispatch logic could be helpful (reusable). chgserver also
> > needs a ui object, a debugger could be useful, too.
> > 
> > What do you about putting the "if-it-is-chg" condition in "_runcatch" ?
> > 
> >   hg -> run -> dispatch -> _runcatch -> _dispatch -> runcommand -> _runcommand
> >    \                          \
> >     -> chg run (current)       -> chg _dispatch (proposal)
> > 
> > The "chg _dispatch" function, if short, could be put just in dispatch.py
> > calling chgserver functions. Otherwise it could be "chgserver._dispatch".
> 
> I don't get the meaning of "hg -> chg run (current)", but sharing some dispatch
> functions sounds nice.

Ah, it's an unsent patch that changes "hg" script to call "chgserver.run".

> > > BTW, I have the patches to move chgserver.py to the core. If they help making
> > > your series without the copy of chgserver.py, I'll send them out. But I guess
> > > they wouldn't.
> > 
> > If we can allow chg to be broken for some time, then it is fine. The copy is
> > like an "atomictemp" to make sure the old code works (and I don't need to
> > care about the compatibility, which is a bit tricky to maintain) during the
> > change.
> 
> Can you narrow down the breakage to one series of patches by e.g. moving
> some cleanup patches to the last series? Perhaps broken for weeks would be
> unwanted.

The incompatibility will be mainly about the pager. Maybe I could try
changing the pager implementation first, then changing the entry point.


More information about the Mercurial-devel mailing list