21c2df59a regressed bundle2 by catching all exceptions and trying to handle
them. The old behavior was to allow KeyboardInterrupts to throw and not have
graceful cleanup, which allowed it to exit immediately. Let's go back to that
behavior.
Details
- Reviewers
quark - Group Reviewers
hg-reviewers - Commits
- rHG5f79f5f8487a: bundle2: immediate exit for ctrl+c (issue5692)
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Event Timeline
mercurial/bundle2.py | ||
---|---|---|
380 | Actually KeyboardInterrupt is tested here. So there is something else going on. Maybe we should add error.SignalInterrupt to the list? |
mercurial/bundle2.py | ||
---|---|---|
380 | SignalInterrupt is a subclass of KeyboardInterrupt, so there might FWIW, I think it's probably a good idea to replace this blacklist |
mercurial/bundle2.py | ||
---|---|---|
380 | Before my refactor there used to be two levels of error handling, 1) inside _parthandler which tried to seek to the end if it wasn't systemexit or keyboardinterrup, and 2) inside processbundle (which calls _parthandler) which only caught type Exception. It seems like the correct unification of these would be to just keep the isinstance(exc, Exception) check above, and delete this sub-check entirely. I'll send an update. |
Actually KeyboardInterrupt is tested here. So there is something else going on. Maybe we should add error.SignalInterrupt to the list?