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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 28 17:44:53 PDT 2009


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


David Kilzer (ddkilzer) <ddkilzer at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #33683|Patch v1                    |Patch v4
        description|                            |




--- Comment #16 from David Kilzer (ddkilzer) <ddkilzer at webkit.org>  2009-07-28 17:44:50 PDT ---
(From update of attachment 33683)
(In reply to comment #9)
> (From update of attachment 32609 [details])
>  489         bug_id = tool.bugs.create_bug_with_patch(bug_title, comment_text,
> options.component, diff_file, "Patch v1", cc=options.cc,
> mark_for_review=options.review)
> 
> Is "Patch v1" intended there?

Yes.  It's a sensible default until a switch is added later to provide a patch
description.

> You don't have to forward declare in python AFAIK:
> bug_title = ""
>  476         comment_text = ""

Due to scoping rules in Python, this was required.

> It seems this wants to be its own function:
> 80             commit_message = tool.scm().commit_message_for_commit(commit_id)
>  481             commit_lines = [re.sub('^ {0,8}', '', line, 1) for line in
> commit_message.splitlines()]
>  482             bug_title = commit_lines[0]
>  483             comment_text = "\n".join(commit_lines[1:]) + "\n"
>  484             comment_text += "---\n"
>  485             comment_text +=
> tool.scm().files_changed_summary_for_commit(commit_id)
> 
> There seems to be come copy/paste from the previous section:
>  503             commit_message = commit_message_for_this_commit(tool.scm())
>  504             commit_lines = [re.sub('^ {0,8}', '', line, 1) for line in
> commit_message.splitlines()]
>  505             bug_title = commit_lines[0]
>  506             comment_text = "\n".join(commit_lines[1:]) + "\n"

These were updated to use CommitMessage methods from Bug 27172.

> AGain, no need for forward-declare:
> 498         bug_title = ""
>  499         comment_text = ""

They are needed.

> We shoudl just fix all these functions to detect a string and turn it into a
> file for Mechanize:
>          diff = tool.scm().create_patch()
>  509         diff_file = StringIO.StringIO(diff) # create_bug_with_patch
> expects a file-like object
>  510         bug_id = tool.bugs.create_bug_with_patch(bug_title, comment_text,
> options.component, diff_file, "Patch v1", cc=options.cc,
> mark_for_review=options.review)

Not done per Comment #11 and Comment #13.

> You can invert the order of the clauses with:
> if len(args) == 0
> and use
> if len(args) instead.  Doesn't really matter.

Done.

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