| Summary: | [git-webkit] Improve handling of Ctrl-C during git-webkit commands while waiting for user input | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Aakash Jain <aakash_jain> |
| Component: | Tools / Tests | Assignee: | Jonathan Bedard <jbedard> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | aakash_jain, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=235655 | ||
In most cases, I think the stack-trace is the right option. However, a Ctrl-C during input seems like a special case (as the example stack-trace is), and one we could pretty easily handle differently (In reply to Jonathan Bedard from comment #1) > In most cases, I think the stack-trace is the right option. However, a Ctrl-C during input seems like a special case (as the example stack-trace is), and one we could pretty easily handle differently Yeah, the specific use-case I had in mind was pressing Ctrl-C when user was asked for an input. Re-titled the bug appropriately. At the moment, one of the series of commits in https://github.com/WebKit/WebKit/pull/99 has this fix. Fixed in 246695@main (r288966) Thanks! Seems to be working fine. e.g.: [/Volumes/Apple/code/WebKit/Tools/CISupport/ews-build]$git-webkit pr 'main' is not a pull request branch, enter name of new branch: ^C User interrupted program |
Improve handling of Ctrl-C during git-webkit commands. Currently it prints a stack-trace which might not be very readable. e.g.: [WebKit]$git-webkit pr Branch name: ^CTraceback (most recent call last): File "/Volumes/Apple/code/WebKit/Tools/Scripts/git-webkit", line 69, in <module> sys.exit(program.main( File "/Volumes/Apple/code/WebKit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py", line 134, in main return parsed.main( File "/Volumes/Apple/code/WebKit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py", line 111, in main if Branch.main(args, repository, **kwargs): File "/Volumes/Apple/code/WebKit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py", line 79, in main args.issue = Terminal.input('Branch name: ') File "/Volumes/Apple/code/WebKit/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/terminal.py", line 39, in input return (input if sys.version_info > (3, 0) else raw_input)(*args, **kwargs) KeyboardInterrupt