<?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>27164</bug_id>
          
          <creation_ts>2009-07-10 16:35:40 -0700</creation_ts>
          <short_desc>webkit-patch: Individual commands should support -h|--help</short_desc>
          <delta_ts>2010-03-22 20:16:06 -0700</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>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>26912</dependson>
    
    <dependson>31697</dependson>
    
    <dependson>31771</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="David Kilzer (:ddkilzer)">ddkilzer</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>eric</cc>
    
    <cc>mjs</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>131009</commentid>
    <comment_count>0</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2009-07-10 16:35:40 -0700</bug_when>
    <thetext>When running bugzilla-tool, it would be useful to be able to run:

$ bugzilla-tool commandname -h

and get help on the individual command (instead of all of them).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>131011</commentid>
    <comment_count>1</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2009-07-10 16:45:48 -0700</bug_when>
    <thetext>I&apos;m not sure how to go about doing this, or I would have posted a patch already.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>131014</commentid>
    <comment_count>2</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-07-10 16:47:32 -0700</bug_when>
    <thetext>or bugzilla-tool help commandname
like git does.

Either works.  This would compete with Ojan&apos;s request to have global arguments truly global:
https://bugs.webkit.org/show_bug.cgi?id=26912</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>131015</commentid>
    <comment_count>3</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-07-10 16:48:37 -0700</bug_when>
    <thetext>bzt help command
would be rather easy to implement.

You just make a new Command subclass which in execute() knows how to reach back at the command dictionary, lookup the command and then call teh right help-printing functions for the OptionParser created for the command.

Would probably need a bunch of method abstraction, but should be straightforward.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>131016</commentid>
    <comment_count>4</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-07-10 16:50:00 -0700</bug_when>
    <thetext>I would like to abstract all my crazy command parsing stuff out into one nice OptionParser subclass some day.  Then bugzilla-tool itself has nothing to do with all the option parsing stuff, it&apos;s just a list of commands which are fed off into this fancy git-like OptionParser class.  In a future fantasy word, this subclass could go upstream to python, but I doubt we&apos;d ever reach that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>165633</commentid>
    <comment_count>5</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-11-21 12:23:27 -0800</bug_when>
    <thetext>The &quot;individual help&quot; part of this was fixed by bug 31697.  The accepting --help anywhere will be fixed by bug 26912.

I&apos;m about to post a patch to make --help spew much much better as part of bug 31771.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>170346</commentid>
    <comment_count>6</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-12-10 00:09:54 -0800</bug_when>
    <thetext>With the proposed approach in bug 26912 of having a single options parser object, this bug will become a dupe of bug 26912.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>174742</commentid>
    <comment_count>7</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-12-23 23:21:17 -0800</bug_when>
    <thetext>Oh boy.  Well, commands support --help now, but it doesn&apos;t quite do what you might expect.  It prints the global help.  So sad. :(

I guess we&apos;re supposed to treat &quot;tool --help command&quot; different from &quot;tool command --help&quot;?  Or I guess we just have to detect that we found a command...

This might have been &quot;easier&quot; before parts of bug 26912.  bleh.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>174743</commentid>
    <comment_count>8</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-12-23 23:32:04 -0800</bug_when>
    <thetext>Looks like &quot;svn commit --help&quot; and &quot;svn --help commit&quot; are both equivalent to &quot;svn help commit&quot;.  This bug is probably most easily fixed by finally biting the bullet and writing our own help printing instead of hacking into OptionParser&apos;s</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>202625</commentid>
    <comment_count>9</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2010-03-22 11:16:38 -0700</bug_when>
    <thetext>Can this be closed now?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>202631</commentid>
    <comment_count>10</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2010-03-22 11:19:13 -0700</bug_when>
    <thetext>Well, --help functions strangely, see https://bugs.webkit.org/show_bug.cgi?id=27164#c7, but we could close this if you like.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>202905</commentid>
    <comment_count>11</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2010-03-22 20:16:06 -0700</bug_when>
    <thetext>(In reply to comment #10)
&gt; Well, --help functions strangely, see
&gt; https://bugs.webkit.org/show_bug.cgi?id=27164#c7, but we could close this if
&gt; you like.

Okay, let&apos;s leave it open to support -h|--help on each command some day.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>