This is an archive of the discontinued Mercurial Phabricator instance.

worker: handle interrupt on windows
ClosedPublic

Authored by wlis on Dec 18 2017, 6:19 PM.

Details

Summary

After applying suggestions from https://phab.mercurial-scm.org/D1564
to catch all exceptions in the same way I actually broke the handling of
KeyboardInterrupt on windows. The reason is that KeyboardInterrupt doesn't
dervie from Exception, but BaseException:
https://docs.python.org/2/library/exceptions.html starting from python 2.5

Test Plan

Run hg on windows and ctrl-c during a large update. No random
exceptions from threads surface in the shell. Previously we'd nearly always get
stack traces from some of threads

Run tests ./run-tests.py
[...]
Failed test-convert-svn-encoding.t: output changed

Ran 622 tests, 41 skipped, 1 failed.

python hash seed: 2962682116

The test failing seems to have nothing to do with the change and fails on base
revision as well

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

wlis created this revision.Dec 18 2017, 6:19 PM
krbullock accepted this revision.Dec 18 2017, 10:55 PM
krbullock added a subscriber: krbullock.

Whoops, queued, thanks.

This revision is now accepted and ready to land.Dec 18 2017, 10:55 PM
This revision was automatically updated to reflect the committed changes.