WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
Bug 27164
webkit-patch: Individual commands should support -h|--help
https://bugs.webkit.org/show_bug.cgi?id=27164
Summary
webkit-patch: Individual commands should support -h|--help
David Kilzer (:ddkilzer)
Reported
2009-07-10 16:35:40 PDT
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).
Attachments
Add attachment
proposed patch, testcase, etc.
David Kilzer (:ddkilzer)
Comment 1
2009-07-10 16:45:48 PDT
I'm not sure how to go about doing this, or I would have posted a patch already.
Eric Seidel (no email)
Comment 2
2009-07-10 16:47:32 PDT
or bugzilla-tool help commandname like git does. Either works. This would compete with Ojan's request to have global arguments truly global:
https://bugs.webkit.org/show_bug.cgi?id=26912
Eric Seidel (no email)
Comment 3
2009-07-10 16:48:37 PDT
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.
Eric Seidel (no email)
Comment 4
2009-07-10 16:50:00 PDT
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'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'd ever reach that.
Eric Seidel (no email)
Comment 5
2009-11-21 12:23:27 PST
The "individual help" part of this was fixed by
bug 31697
. The accepting --help anywhere will be fixed by
bug 26912
. I'm about to post a patch to make --help spew much much better as part of
bug 31771
.
Eric Seidel (no email)
Comment 6
2009-12-10 00:09:54 PST
With the proposed approach in
bug 26912
of having a single options parser object, this bug will become a dupe of
bug 26912
.
Eric Seidel (no email)
Comment 7
2009-12-23 23:21:17 PST
Oh boy. Well, commands support --help now, but it doesn't quite do what you might expect. It prints the global help. So sad. :( I guess we're supposed to treat "tool --help command" different from "tool command --help"? Or I guess we just have to detect that we found a command... This might have been "easier" before parts of
bug 26912
. bleh.
Eric Seidel (no email)
Comment 8
2009-12-23 23:32:04 PST
Looks like "svn commit --help" and "svn --help commit" are both equivalent to "svn help commit". This bug is probably most easily fixed by finally biting the bullet and writing our own help printing instead of hacking into OptionParser's
David Kilzer (:ddkilzer)
Comment 9
2010-03-22 11:16:38 PDT
Can this be closed now?
Eric Seidel (no email)
Comment 10
2010-03-22 11:19:13 PDT
Well, --help functions strangely, see
https://bugs.webkit.org/show_bug.cgi?id=27164#c7
, but we could close this if you like.
David Kilzer (:ddkilzer)
Comment 11
2010-03-22 20:16:06 PDT
(In reply to
comment #10
)
> Well, --help functions strangely, see >
https://bugs.webkit.org/show_bug.cgi?id=27164#c7
, but we could close this if > you like.
Okay, let's leave it open to support -h|--help on each command some day.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug