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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jul 10 17:10:23 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=27119





--- Comment #3 from David Kilzer (ddkilzer) <ddkilzer at webkit.org>  2009-07-10 17:10:22 PDT ---
(In reply to comment #2)
> (From update of attachment 32518 [details])

> maybe this would be "bug-from-commits" and "bug-from-diff" is the one svn users
> would use.  It's possible we could wrap them both into a single command,
> although currently post-diff and post-commits are separate because git users
> (at least myself) use both at different times.  post-diff is the only one which
> svn users use equivalently bug-from-diff would be for svn users so they don't
> have to create a patch file.

Yes, I should have named the command CreateBugWithCommit() instead of
CreateBugWithPatch().  It would be nice if the create-bug command would work
with both SCMs without having to create different commands for each.

> It seems we should name the option "COMMIT" instead of COMMITISH if only one
> commit is supported?

I wanted it to support multiple commits eventually, just not in the first pass.
 I will change this for the first version and update it later.

> I thikn this should be in its own function:
> 480         commit_lines = [re.sub('^ {0,8}', '', line, 1) for line in
> commit_message.splitlines()]
>  481 
>  482         bug_title = commit_lines[0]
>  483         comment_text = "\n".join(commit_lines[1:])
>  484         comment_text += "\n---\n"
>  485         comment_text +=
> tool.scm().files_changed_summary_for_commit(commit_id)
> 
> (title, description) = title_and_description_for_bug(commit_text)
>  maybe?

I created a CommitMessage class that does this for you.  Haven't uploaded it
quite yet.

> It seems this belongs in a local: (since you type it out twice)
> self.browser.find_control('component').items

Okay.

> Aren't bug descriptions required by bugzilla?

Please re-read the list of create_bug_with_patch() arguments.  Perhaps I should
be using named parameters to make it clearer?  Or creating a dictionary and
passing that in.  Yes, a bug[] dictionary would be nicer.

> I would probably break the create_bug function up into smaller pieces still.  I
> tend to be alergic to functions longer than about 30 lines. ;)

Yes, I could probably break out the error handling stuff into a separate
method.

> In general this looks great though!

Thanks!

Note that I probably won't have time to work on this again until Tuesday.

-- 
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