[Webkit-unassigned] [Bug 27119] bugzilla-tool: Add create-bug command

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 28 21:57:55 PDT 2009


--- Comment #20 from David Kilzer (ddkilzer) <ddkilzer at webkit.org>  2009-07-28 21:57:53 PDT ---
(From update of attachment 33691)
(In reply to comment #18)
> (From update of attachment 33683 [details])
> Biggest concern:
> I don't understand the bootstrapping aspect to this. In order to create a well
> formed patch, I need a changelog with a bug link/title.  This tool creates a
> bug for a patch, but by definition, the patch must not be well formed because
> the bug doesn't exist yet.
> It could modify the ChangeLog right after creating the bug (but that sounds
> complicated especially considering that you can given it a COMMITISH....)

I honestly don't understand what you're asking here.  This is the workflow I
envision for git and svn:

1. Modify code.
2. Run prepare-ChangeLog
3. Edit ChangeLogs.
4. Commit the patch.
5. Run bugzilla-tool create-bug.

Svn (or local changes to Git, if you roll that way)
1. Modify code.
2. Run prepare-ChangeLog
3. Edit ChangeLogs.
4. Run bugzilla-tool create-bug.

Either way you have to go back and add the bug number to the ChangeLog files
currently.  This addresses the initial need for a way to create a Bugzilla bug
for a patch, which Maciej and others have been asking for on webkit-dev.

After this create-bug patch lands, I plan to make it possible to substitute the
bug number in the ChangeLog entry before you commit--similar to how the
reviewer is added now.  I just didn't want to do it all at once and create a
huge patch.

> > +        Command.__init__(self, 'Create a bug from local changes or local commits', '[COMMITISH]', options=options)
> Nice to add period to this sentence.


> > +    def create_bug_from_commit(self, options, args, tool):
> > +        commit_ids = tool.scm().commit_ids_from_range_arguments(args, cherry_pick=True)
> This won't be very friendly to svn users if they happen to given an extra
> argument.  Maybe it should check that it is git and if not, error out with a
> friendly message.

Fixed before create_bug_from_commit() is called.

> > +    def check_create_bug_response_returning_bug_id_on_success(self, response_html):
> If you don't expect external callers, then prefix it with a _
> It is quite long. What about _get_create_bug_id(self, create_bug_response):
> or something else (even) shorter?

I was trying to use a descriptive method name here, but I guess I got carried
away.  Added "_" prefix and removed "_returning_bug_id_on_success" suffix.

> > +    def create_bug_with_patch(self, bug_title, bug_description, component, patch_file_object, patch_description, cc, mark_for_review=False):
> ...
> > +        if not component or component not in [item.name for item in component_items]:
> > +            component = self.prompt_for_component([item.name for item in component_items])
> This is fine.  I like this better:
>         component_names = map(lambda item: item.name, component_items)
>         if not component or component not in component_names:
>             component = self.prompt_for_component(component_names)
> You choose.

I chose your way.  I'm new to python, so I haven't used this map/lambda
construct.  Very concise, though.

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list