Bug 30537 - webkit-patch create-bug should support attaching a series of patches
Summary: webkit-patch create-bug should support attaching a series of patches
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-19 14:25 PDT by Adam Roben (:aroben)
Modified: 2017-07-18 08:30 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Roben (:aroben) 2009-10-19 14:25:40 PDT
To reproduce:

1. Run this command: bugzilla-tool create-bug HEAD^..
2. Answer all the prompts

The bug gets created and the first patch gets attached. Then you get an exception like this:

Traceback (most recent call last):
  File "/home/Adam Roben/dev/WebKit/OpenSource/WebKitTools/Scripts/bugzilla-tool", line 904, in <module>
    main()
  File "/home/Adam Roben/dev/WebKit/OpenSource/WebKitTools/Scripts/bugzilla-tool", line 901, in main
    return tool.main()
  File "/home/Adam Roben/dev/WebKit/OpenSource/WebKitTools/Scripts/bugzilla-tool", line 896, in main
    return command_object.execute(command_options, command_args, self)
  File "/home/Adam Roben/dev/WebKit/OpenSource/WebKitTools/Scripts/bugzilla-tool", line 629, in execute
    self.create_bug_from_commit(options, args, tool)
  File "/home/Adam Roben/dev/WebKit/OpenSource/WebKitTools/Scripts/bugzilla-tool", line 592, in create_bug_from_commit
    PostCommitsAsPatchesToBug.execute(self, options, commit_ids[1:], tool)
TypeError: unbound method execute() must be called with PostCommitsAsPatchesToBug instance as first argument (got CreateBug instance instead)
Comment 1 David Kilzer (:ddkilzer) 2009-10-19 14:28:21 PDT
The issue is that create-bug only supports one patch to be posted to a new bug.  The failing command is trying to attach two patches to the new bug.
Comment 2 Eric Seidel (no email) 2010-01-19 16:47:43 PST
This usage has fallen out of fashion due to "webkit-patch upload" but it's possible that there are still consumers of this command.
Comment 3 David Kilzer (:ddkilzer) 2010-03-24 15:04:26 PDT
(In reply to comment #2)
> This usage has fallen out of fashion due to "webkit-patch upload" but it's
> possible that there are still consumers of this command.

The short description for webkit-patch says nothing about creating a new bug, so I never looked at it until I saw the above comment.
Comment 4 Eric Seidel (no email) 2010-03-24 15:06:37 PDT
Yes.  All of the various Commands need better help.

If you'd like to submit patches the "help_text" (short one-line help) and "long_help" (man-page-like help) class members are the things to set:
    help_text = "Print the status of the %s buildbots" % BuildBot.default_host
    long_help = """Fetches build status from http://build.webkit.org/one_box_per_builder
and displayes the status of each builder."""

That's a poor example of a good "long_help: but you get the idea. :)
Comment 5 David Kilzer (:ddkilzer) 2010-03-24 15:12:40 PDT
(In reply to comment #3)
> (In reply to comment #2)
> > This usage has fallen out of fashion due to "webkit-patch upload" but it's
> > possible that there are still consumers of this command.
> 
> The short description for webkit-patch says nothing about creating a new bug,
> so I never looked at it until I saw the above comment.

Thanks for the info, Eric.  But "webkit-patch" upload is not git-friendly and thus doesn't allow a series of patches to be uploaded, which is what I wanted to do for Bug 36560.
Comment 6 Eric Seidel (no email) 2010-03-24 15:15:00 PDT
webkit-patch post-commits should still work for a series of patches. But I haven't personally used that in ages.
Comment 7 Eric Seidel (no email) 2010-03-24 15:15:42 PDT
I am truly just a git-poser.  I use git, but instead of local branches I mostly use bugs to hold my patches (using webkit-patch upload and webkit-patch apply-attachment).
Comment 8 Eric Seidel (no email) 2010-04-01 23:27:57 PDT
These days "webkit-patch upload" is the new hotness.  It still doesn't support attaching a series of patches, but that is probably where such changes should go instead of create-bug.  upload will create a bug if needed.