[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.19-706-ge5415e9
abarth at webkit.org
abarth at webkit.org
Thu Feb 4 21:26:27 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 401c92f5dd21af386155bfee7305fbc200f5fcb8
Author: abarth at webkit.org <abarth at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sun Jan 24 11:57:20 2010 +0000
Rubber stamped by Eric Seidel.
More pep8 compliance.
* Scripts/webkitpy/comments.py:
* Scripts/webkitpy/committers.py:
* Scripts/webkitpy/credentials.py:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53776 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index cdc4113..561d904 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -2,6 +2,16 @@
Rubber stamped by Eric Seidel.
+ More pep8 compliance.
+
+ * Scripts/webkitpy/comments.py:
+ * Scripts/webkitpy/committers.py:
+ * Scripts/webkitpy/credentials.py:
+
+2010-01-24 Adam Barth <abarth at webkit.org>
+
+ Rubber stamped by Eric Seidel.
+
Make changelogs.py pass pep8.
* Scripts/webkitpy/changelogs.py:
diff --git a/WebKitTools/Scripts/webkitpy/comments.py b/WebKitTools/Scripts/webkitpy/comments.py
index 657a373..77ad239 100755
--- a/WebKitTools/Scripts/webkitpy/comments.py
+++ b/WebKitTools/Scripts/webkitpy/comments.py
@@ -4,7 +4,7 @@
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
-#
+#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
@@ -14,7 +14,7 @@
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
-#
+#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@@ -27,12 +27,16 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
-# A tool for automating dealing with bugzilla, posting patches, committing patches, etc.
+# A tool for automating dealing with bugzilla, posting patches, committing
+# patches, etc.
from webkitpy.changelogs import view_source_url
+
def bug_comment_from_svn_revision(svn_revision):
- return "Committed r%s: <%s>" % (svn_revision, view_source_url(svn_revision))
+ return "Committed r%s: <%s>" % (svn_revision,
+ view_source_url(svn_revision))
+
def bug_comment_from_commit_text(scm, commit_text):
svn_revision = scm.svn_revision_from_commit_text(commit_text)
diff --git a/WebKitTools/Scripts/webkitpy/committers.py b/WebKitTools/Scripts/webkitpy/committers.py
index 560bd80..19cfd37 100644
--- a/WebKitTools/Scripts/webkitpy/committers.py
+++ b/WebKitTools/Scripts/webkitpy/committers.py
@@ -1,9 +1,9 @@
# Copyright (c) 2009, Google Inc. All rights reserved.
-#
+#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
-#
+#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
@@ -13,7 +13,7 @@
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
-#
+#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@@ -28,7 +28,9 @@
#
# WebKit's Python module for committer and reviewer validation
+
class Committer:
+
def __init__(self, name, email_or_emails):
self.full_name = name
if isinstance(email_or_emails, str):
@@ -37,21 +39,28 @@ class Committer:
self.emails = email_or_emails
self.can_review = False
- # FIXME: We're assuming the first email is a valid bugzilla email, which might not be right.
def bugzilla_email(self):
+ # FIXME: We're assuming the first email is a valid bugzilla email,
+ # which might not be right.
return self.emails[0]
def __str__(self):
return '"%s" <%s>' % (self.full_name, self.emails[0])
+
class Reviewer(Committer):
+
def __init__(self, name, email_or_emails):
Committer.__init__(self, name, email_or_emails)
self.can_review = True
-# This is intended as a canonical, machine-readable list of all non-reviewer committers for WebKit.
-# If your name is missing here and you are a committer, please add it. No review needed.
-# All reviewers are committers, so this list is only of committers who are not reviewers.
+
+# This is intended as a canonical, machine-readable list of all non-reviewer
+# committers for WebKit. If your name is missing here and you are a committer,
+# please add it. No review needed. All reviewers are committers, so this list
+# is only of committers who are not reviewers.
+
+
committers_unable_to_review = [
Committer("Aaron Boodman", "aa at chromium.org"),
Committer("Adam Langley", "agl at chromium.org"),
@@ -145,8 +154,12 @@ committers_unable_to_review = [
Committer("Zoltan Horvath", "zoltan at webkit.org"),
]
-# This is intended as a canonical, machine-readable list of all reviewers for WebKit.
-# If your name is missing here and you are a reviewer, please add it. No review needed.
+
+# This is intended as a canonical, machine-readable list of all reviewers for
+# WebKit. If your name is missing here and you are a reviewer, please add it.
+# No review needed.
+
+
reviewers_list = [
Reviewer("Ada Chan", "adachan at apple.com"),
Reviewer("Adam Barth", "abarth at webkit.org"),
@@ -215,8 +228,12 @@ reviewers_list = [
class CommitterList:
+
# Committers and reviewers are passed in to allow easy testing
- def __init__(self, committers=committers_unable_to_review, reviewers=reviewers_list):
+
+ def __init__(self,
+ committers=committers_unable_to_review,
+ reviewers=reviewers_list):
self._committers = committers + reviewers
self._reviewers = reviewers
self._committers_by_email = {}
diff --git a/WebKitTools/Scripts/webkitpy/credentials.py b/WebKitTools/Scripts/webkitpy/credentials.py
index 7927095..17507bb 100644
--- a/WebKitTools/Scripts/webkitpy/credentials.py
+++ b/WebKitTools/Scripts/webkitpy/credentials.py
@@ -1,10 +1,10 @@
# Copyright (c) 2009 Google Inc. All rights reserved.
# Copyright (c) 2009 Apple Inc. All rights reserved.
-#
+#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
-#
+#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
@@ -14,7 +14,7 @@
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
-#
+#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@@ -38,7 +38,9 @@ from webkitpy.executive import Executive, ScriptError
from webkitpy.webkit_logging import log
from webkitpy.scm import Git
+
class Credentials(object):
+
def __init__(self, host, git_prefix=None, executive=None, cwd=os.getcwd()):
self.host = host
self.git_prefix = git_prefix
@@ -46,14 +48,20 @@ class Credentials(object):
self.cwd = cwd
def _credentials_from_git(self):
- return [self._read_git_config("username"), self._read_git_config("password")]
+ return [self._read_git_config("username"),
+ self._read_git_config("password")]
def _read_git_config(self, key):
- config_key = "%s.%s" % (self.git_prefix, key) if self.git_prefix else key
- return self.executive.run_command(["git", "config", "--get", config_key], error_handler=Executive.ignore_error).rstrip('\n')
+ config_key = "%s.%s" % (self.git_prefix, key) if self.git_prefix \
+ else key
+ return self.executive.run_command(
+ ["git", "config", "--get", config_key],
+ error_handler=Executive.ignore_error).rstrip('\n')
def _keychain_value_with_label(self, label, source_text):
- match = re.search("%s\"(?P<value>.+)\"" % label, source_text, re.MULTILINE)
+ match = re.search("%s\"(?P<value>.+)\"" % label,
+ source_text,
+ re.MULTILINE)
if match:
return match.group('value')
@@ -61,21 +69,31 @@ class Credentials(object):
return platform.mac_ver()[0]
def _parse_security_tool_output(self, security_output):
- username = self._keychain_value_with_label("^\s*\"acct\"<blob>=", security_output)
- password = self._keychain_value_with_label("^password: ", security_output)
+ username = self._keychain_value_with_label("^\s*\"acct\"<blob>=",
+ security_output)
+ password = self._keychain_value_with_label("^password: ",
+ security_output)
return [username, password]
def _run_security_tool(self, username=None):
- security_command = ["/usr/bin/security", "find-internet-password", "-g", "-s", self.host]
+ security_command = [
+ "/usr/bin/security",
+ "find-internet-password",
+ "-g",
+ "-s",
+ self.host,
+ ]
if username:
security_command += ["-a", username]
- log("Reading Keychain for %s account and password. Click \"Allow\" to continue..." % self.host)
+ log("Reading Keychain for %s account and password. "
+ "Click \"Allow\" to continue..." % self.host)
try:
return self.executive.run_command(security_command)
except ScriptError:
- # Failed to either find a keychain entry or somekind of OS-related error
- # occured (for instance, couldn't find the /usr/sbin/security command).
+ # Failed to either find a keychain entry or somekind of OS-related
+ # error occured (for instance, couldn't find the /usr/sbin/security
+ # command).
log("Could not find a keychain entry for %s." % self.host)
return None
@@ -102,6 +120,7 @@ class Credentials(object):
if not username:
username = raw_input("%s login: " % self.host)
if not password:
- password = getpass.getpass("%s password for %s: " % (self.host, username))
+ password = getpass.getpass("%s password for %s: " % (self.host,
+ username))
return [username, password]
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list