WebKit Bugzilla
Attachment 372373 Details for
Bug 198972
: webkit-patch should allow for a bugzilla url not just bugzilla id
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for landing
bug-198972-20190618132905.patch (text/plain), 2.76 KB, created by
Keith Miller
on 2019-06-18 13:29:05 PDT
(
hide
)
Description:
Patch for landing
Filename:
MIME Type:
Creator:
Keith Miller
Created:
2019-06-18 13:29:05 PDT
Size:
2.76 KB
patch
obsolete
>Subversion Revision: 246545 >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 09cccc2467edeb892ac4b5b13a63f3638741f7f5..6b51557ca9b0d37b9e53b692d423dfdfd1901286 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,16 @@ >+2019-06-18 Keith Miller <keith_miller@apple.com> >+ >+ webkit-patch should allow for a bugzilla url not just bugzilla id >+ https://bugs.webkit.org/show_bug.cgi?id=198972 >+ >+ Reviewed by Dewei Zhu. >+ >+ When prompting for a bugzilla id or a new title we should also >+ allow for a bugzilla url. >+ >+ * Scripts/webkitpy/tool/steps/promptforbugortitle.py: >+ (PromptForBugOrTitle.run): >+ > 2019-06-18 Dan Bernstein <mitz@apple.com> > > Revert workaround for bug 198904 from run-webkit-archive >diff --git a/Tools/Scripts/webkitpy/tool/steps/promptforbugortitle.py b/Tools/Scripts/webkitpy/tool/steps/promptforbugortitle.py >index 391144f2042e10fd066bf24435823d38dfb0a875..a323575466401c0efd49b060347326268f3b8bd3 100644 >--- a/Tools/Scripts/webkitpy/tool/steps/promptforbugortitle.py >+++ b/Tools/Scripts/webkitpy/tool/steps/promptforbugortitle.py >@@ -28,7 +28,8 @@ > > from webkitpy.tool.steps.abstractstep import AbstractStep > from webkitpy.tool.steps.options import Options >- >+from urlparse import urlparse >+import re > > class PromptForBugOrTitle(AbstractStep): > @classmethod >@@ -41,12 +42,25 @@ class PromptForBugOrTitle(AbstractStep): > # No need to prompt if we alrady have the bug_id. > if state.get("bug_id"): > return >- user_response = self._tool.user.prompt("Please enter a bug number or a title for a new bug:\n") >- # If the user responds with a number, we assume it's bug number. >+ user_response = self._tool.user.prompt("Please enter a bug number/bugzilla URL or a title for a new bug:\n") >+ # If the user responds with a number or a valid bugzilla URL, we assume it's bug number. > # Otherwise we assume it's a bug subject. > try: > state["bug_id"] = int(user_response) > except ValueError as TypeError: >+ parsed_url = None >+ try: >+ parsed_url = urlparse(user_response) >+ except ValueError: >+ # urlparse can throw a value error for some strings. >+ pass >+ >+ if parsed_url and re.match("bugs.webkit.org", parsed_url.netloc): >+ match = re.match("id=(?P<bug_id>\d+)", parsed_url.query) >+ if match: >+ state["bug_id"] = int(match.group("bug_id")) >+ return >+ > if not self._options.non_interactive and not self._tool.user.confirm("Are you sure you want to create a new bug?", default="n"): > self._exit(1) > state["bug_title"] = user_response
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198972
:
372359
| 372373