<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>235524</bug_id>
          
          <creation_ts>2022-01-24 09:10:46 -0800</creation_ts>
          <short_desc>[git-webkit] Improve handling of Ctrl-C during git-webkit commands while waiting for user input</short_desc>
          <delta_ts>2022-02-02 11:00:15 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=235655</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Aakash Jain">aakash_jain</reporter>
          <assigned_to name="Jonathan Bedard">jbedard</assigned_to>
          <cc>aakash_jain</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1833357</commentid>
    <comment_count>0</comment_count>
    <who name="Aakash Jain">aakash_jain</who>
    <bug_when>2022-01-24 09:10:46 -0800</bug_when>
    <thetext>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 &quot;/Volumes/Apple/code/WebKit/Tools/Scripts/git-webkit&quot;, line 69, in &lt;module&gt;
    sys.exit(program.main(
  File &quot;/Volumes/Apple/code/WebKit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py&quot;, line 134, in main
    return parsed.main(
  File &quot;/Volumes/Apple/code/WebKit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py&quot;, line 111, in main
    if Branch.main(args, repository, **kwargs):
  File &quot;/Volumes/Apple/code/WebKit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py&quot;, line 79, in main
    args.issue = Terminal.input(&apos;Branch name: &apos;)
  File &quot;/Volumes/Apple/code/WebKit/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/terminal.py&quot;, line 39, in input
    return (input if sys.version_info &gt; (3, 0) else raw_input)(*args, **kwargs)
KeyboardInterrupt</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1833363</commentid>
    <comment_count>1</comment_count>
    <who name="Jonathan Bedard">jbedard</who>
    <bug_when>2022-01-24 09:19:53 -0800</bug_when>
    <thetext>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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1833365</commentid>
    <comment_count>2</comment_count>
    <who name="Aakash Jain">aakash_jain</who>
    <bug_when>2022-01-24 09:22:15 -0800</bug_when>
    <thetext>(In reply to Jonathan Bedard from comment #1)
&gt; 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1835561</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-01-31 09:41:36 -0800</bug_when>
    <thetext>&lt;rdar://problem/88276494&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1835636</commentid>
    <comment_count>4</comment_count>
    <who name="Jonathan Bedard">jbedard</who>
    <bug_when>2022-01-31 12:28:35 -0800</bug_when>
    <thetext>At the moment, one of the series of commits in https://github.com/WebKit/WebKit/pull/99 has this fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1836533</commentid>
    <comment_count>5</comment_count>
    <who name="Jonathan Bedard">jbedard</who>
    <bug_when>2022-02-02 10:55:28 -0800</bug_when>
    <thetext>Fixed in 246695@main (r288966)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1836535</commentid>
    <comment_count>6</comment_count>
    <who name="Aakash Jain">aakash_jain</who>
    <bug_when>2022-02-02 11:00:15 -0800</bug_when>
    <thetext>Thanks! Seems to be working fine. 
e.g.:
[/Volumes/Apple/code/WebKit/Tools/CISupport/ews-build]$git-webkit pr
&apos;main&apos; is not a pull request branch, enter name of new branch: ^C
User interrupted program</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>