https://bugs.webkit.org/show_bug.cgi?id=74929
Add "excludefield=attachmentdata" to the URL everywhere
"ctype=xml" is used to exclude this field from the XML.
Reviewed by Adam Barth.
* Scripts/prepare-ChangeLog:
(fetchBugDescriptionFromURL):
* Scripts/webkitpy/common/config/urls.py:
* Scripts/webkitpy/common/config/urls_unittest.py:
(URLsTest.test_parse_bug_id):
* Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
(Bugzilla.bug_url_for_bug_id):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@116934
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-05-14 David Kilzer <ddkilzer@apple.com>
+
+ webkit-patch apply-attachment is very slow for big patches
+ https://bugs.webkit.org/show_bug.cgi?id=74929
+
+ Add "excludefield=attachmentdata" to the URL everywhere
+ "ctype=xml" is used to exclude this field from the XML.
+
+ Reviewed by Adam Barth.
+
+ * Scripts/prepare-ChangeLog:
+ (fetchBugDescriptionFromURL):
+ * Scripts/webkitpy/common/config/urls.py:
+ * Scripts/webkitpy/common/config/urls_unittest.py:
+ (URLsTest.test_parse_bug_id):
+ * Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
+ (Bugzilla.bug_url_for_bug_id):
+
2012-05-13 Ryosuke Niwa <rniwa@webkit.org>
performance tests should be able to measure runs/sec rather than time
{
my ($bugURL, $bugNumber) = @_;
- my $bugXMLURL = "$bugURL&ctype=xml";
+ my $bugXMLURL = "$bugURL&ctype=xml&excludefield=attachmentdata";
# Perl has no built in XML processing, so we'll fetch and parse with curl and grep
# Pass --insecure because some cygwin installs have no certs we don't
# care about validating that bugs.webkit.org is who it says it is here.
bug_server_host = "bugs." + bug_server_domain
_bug_server_regex = "https?://%s/" % re.sub('\.', '\\.', bug_server_host)
bug_server_url = "https://%s/" % bug_server_host
-bug_url_long = _bug_server_regex + r"show_bug\.cgi\?id=(?P<bug_id>\d+)(&ctype=xml)?"
+bug_url_long = _bug_server_regex + r"show_bug\.cgi\?id=(?P<bug_id>\d+)(&ctype=xml|&excludefield=attachmentdata)*"
bug_url_short = r"https?\://%s/b/(?P<bug_id>\d+)" % bug_server_domain
attachment_url = _bug_server_regex + r"attachment\.cgi\?id=(?P<attachment_id>\d+)(&action=(?P<action>\w+))?"
self.assertEquals(12345, parse_bug_id("http://webkit.org/b/12345"))
self.assertEquals(12345, parse_bug_id("foo\n\nhttp://webkit.org/b/12345\nbar\n\n"))
self.assertEquals(12345, parse_bug_id("http://bugs.webkit.org/show_bug.cgi?id=12345"))
+ self.assertEquals(12345, parse_bug_id("http://bugs.webkit.org/show_bug.cgi?id=12345&ctype=xml"))
+ self.assertEquals(12345, parse_bug_id("http://bugs.webkit.org/show_bug.cgi?id=12345&ctype=xml&excludefield=attachmentdata"))
+ self.assertEquals(12345, parse_bug_id("http://bugs.webkit.org/show_bug.cgi?id=12345excludefield=attachmentdata&ctype=xml"))
# Our url parser is super-fragile, but at least we're testing it.
self.assertEquals(None, parse_bug_id("http://www.webkit.org/b/12345"))
self.assertEquals(None, parse_bug_id("http://bugs.webkit.org/show_bug.cgi?ctype=xml&id=12345"))
+ self.assertEquals(None, parse_bug_id("http://bugs.webkit.org/show_bug.cgi?ctype=xml&id=12345&excludefield=attachmentdata"))
+ self.assertEquals(None, parse_bug_id("http://bugs.webkit.org/show_bug.cgi?ctype=xml&excludefield=attachmentdata&id=12345"))
+ self.assertEquals(None, parse_bug_id("http://bugs.webkit.org/show_bug.cgi?excludefield=attachmentdata&ctype=xml&id=12345"))
+ self.assertEquals(None, parse_bug_id("http://bugs.webkit.org/show_bug.cgi?excludefield=attachmentdata&id=12345&ctype=xml"))
def test_parse_attachment_id(self):
self.assertEquals(12345, parse_attachment_id("https://bugs.webkit.org/attachment.cgi?id=12345&action=review"))
def bug_url_for_bug_id(self, bug_id, xml=False):
if not bug_id:
return None
- content_type = "&ctype=xml" if xml else ""
+ content_type = "&ctype=xml&excludefield=attachmentdata" if xml else ""
return "%sshow_bug.cgi?id=%s%s" % (config_urls.bug_server_url, bug_id, content_type)
def short_bug_url_for_bug_id(self, bug_id):