view tests/test-check-pylint.t @ 33668:cde4cfeb6e3e stable

ui: restore behavior to ignore some I/O errors (issue5658) e9646ff34d55 and 1bfb9a63b98e refactored ui methods to no longer silently swallow some IOError instances. This is arguably the correct thing to do. However, it had the unfortunate side-effect of causing StdioError to bubble up to sensitive code like transaction aborts, leading to an uncaught exceptions and failures to e.g. roll back a transaction. This could occur when a remote HTTP or SSH client connection dropped. The new behavior is resulting in semi-frequent "abandonded transaction" errors on multiple high-volume repositories at Mozilla. This commit effectively reverts e9646ff34d55 and 1bfb9a63b98e to restore the old behavior. I agree with the principle that I/O errors shouldn't be ignored. That makes this change... unfortunate. However, our hands are tied for what to do on stable. I think the proper solution is for the ui's behavior to be configurable (possibly via a context manager). During critical sections like transaction rollback and abort, it should be possible to suppress errors. But this feature would not be appropriate on stable.
author Gregory Szorc <gregory.szorc@gmail.com>
date Tue, 15 Aug 2017 13:04:31 -0700
parents 778dc37ce683
children 41401f502c83
line wrap: on
line source

#require test-repo pylint hg10

Run pylint for known rules we care about.
-----------------------------------------

There should be no recorded failures; fix the codebase before introducing a
new check.

Current checks:
- W0102: no mutable default argument

  $ touch $TESTTMP/fakerc
  $ pylint --rcfile=$TESTTMP/fakerc --disable=all \
  >   --enable=W0102 --reports=no \
  >   mercurial hgdemandimport hgext hgext3rd
   (?)
  ------------------------------------ (?)
  Your code has been rated at 10.00/10 (?)
   (?)