[PATCH 3 of 3] chgserver: print traceback if --traceback flag is passed to validate

Yuya Nishihara yuya at tcha.org
Tue Mar 22 11:42:43 EDT 2016


On Mon, 21 Mar 2016 11:32:59 -0700, Jun Wu wrote:
> On 03/20/2016 06:27 PM, Yuya Nishihara wrote:
> >           try:
> > -            self.ui, lui = _loadnewui(self.ui, args)
> > +            try:
> > +                self.ui, lui = _loadnewui(self.ui, args)
> 
> The nested try catch is not necessary, since dispatch.py won't print traceback
> even with --traceback when it encounters ParseError.

It sounds like a bug (or a misfeature) of dispatch(). That said, I need to
rethink about the patch 3, so please disregard it. The other patches can be
applied without it.

junw: there's a bug. --traceback flag persists because it isn't unset by
dispatch.

  start server with --traceback
  $ chg verify --traceback
  run command without --traceback
  $ chg verify
  ^C
  Traceback (most recent call last):
    ...


More information about the Mercurial-devel mailing list