D3444: tests: comprehensively test exit handling

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Fri May 11 23:55:18 EDT 2018


indygreg added a comment.


  In https://phab.mercurial-scm.org/D3444#54922, @yuja wrote:
  
  > I generally like the direction of this series, but I think there's no point
  >  to extend Mercurial's exit code handling to support all weird Python types.
  >
  > Only ints and (None for 0) are ever valid.
  
  
  The reason I did this is because from the context or `rhg`, we don't have CPython's default exit handling to fall back on. Our choices are:
  
  1. Reimplement CPython's exit/error handling in Rust
  2. Reimplement CPython's exit/error handling in Python in dispatch [so the end state is more well-defined]
  3. Do something crude in `rhg` when we hit special cases that CPython would normally deal with.
  
  Since extensions could do weird things, I figured 2 was the best option.
  
  But I'll take a look at this series again and re-evaluate if we can simplify things. I just thought I'd brain dump on what I'm thinking.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3444

To: indygreg, #hg-reviewers
Cc: yuja, mercurial-devel


More information about the Mercurial-devel mailing list