[PATCH 2 of 2] chgserver: handle ParseError during validate

Yuya Nishihara yuya at tcha.org
Fri Mar 11 11:14:11 EST 2016


On Fri, 11 Mar 2016 15:55:27 +0000, Jun Wu wrote:
> On 03/11/2016 03:52 PM, Jun Wu wrote:
> > On 03/11/2016 03:46 PM, Yuya Nishihara wrote:
> >> Can it return an instruction such as "unlink" to forcibly retry
> >> connection? It seems ugly to keep exitcode until "runcommand" and simulate
> >> the behavior of dispatch().
> >
> > Good idea. I don't like this approach either.
> >
> > I will add something like "exit 255". Retry does not help here since you
> > will still get a same ParseError.
> 
> I just realized you mean "unlink" and force starting a new server.
> Actually I have thought about "unlink". I didn't do it that way because I
> thought it would be a waste of time. But if we want to get rid of copying
> code from dispatch.py it makes sense.
> 
> I will try if we can extract some common logic in dispatch.py into reusable
> functions.

Yeah "exit" sounds fine. I pointed out "unlink" just because it would be
easy.


More information about the Mercurial-devel mailing list