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
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
mercurial/bundle2.py | ||
---|---|---|
372–373 | Actually KeyboardInterrupt is tested here. So there is something else going on. Maybe we should add error.SignalInterrupt to the list? |
mercurial/bundle2.py | ||
---|---|---|
372–373 | 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 | ||
---|---|---|
372–373 | 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?