[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198
eric at webkit.org
eric at webkit.org
Sun Feb 20 22:56:13 UTC 2011
The following commit has been merged in the webkit-1.3 branch:
commit dfc446d1519adc03af8b5095d3e0847450054983
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Jan 14 01:56:51 2011 +0000
2011-01-13 Eric Seidel <eric at webkit.org>
Reviewed by Mihai Parparita.
webkit-patch suggest-reviewers fails due to invalid utf8 in ChangeLog files
https://bugs.webkit.org/show_bug.cgi?id=52416
Example: webkit-patch suggest-reviewers -g ca3890fe74d94d85d6bfa48f9ea497b094d8e717
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 536-538: invalid data
I also added FIXMEs about the changed_files returning deleted files problem
which is causing the other most common exception for suggest-reviewers
(and is probably breaking sheriff-bots blame detection).
* Scripts/webkitpy/common/checkout/api.py:
* Scripts/webkitpy/common/checkout/api_unittest.py:
* Scripts/webkitpy/common/checkout/scm.py:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75761 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Tools/ChangeLog b/Tools/ChangeLog
index 8a3a748..1ba9ef4 100644
--- a/Tools/ChangeLog
+++ b/Tools/ChangeLog
@@ -1,5 +1,23 @@
2011-01-13 Eric Seidel <eric at webkit.org>
+ Reviewed by Mihai Parparita.
+
+ webkit-patch suggest-reviewers fails due to invalid utf8 in ChangeLog files
+ https://bugs.webkit.org/show_bug.cgi?id=52416
+
+ Example: webkit-patch suggest-reviewers -g ca3890fe74d94d85d6bfa48f9ea497b094d8e717
+ UnicodeDecodeError: 'utf8' codec can't decode bytes in position 536-538: invalid data
+
+ I also added FIXMEs about the changed_files returning deleted files problem
+ which is causing the other most common exception for suggest-reviewers
+ (and is probably breaking sheriff-bots blame detection).
+
+ * Scripts/webkitpy/common/checkout/api.py:
+ * Scripts/webkitpy/common/checkout/api_unittest.py:
+ * Scripts/webkitpy/common/checkout/scm.py:
+
+2011-01-13 Eric Seidel <eric at webkit.org>
+
Reviewed by Adam Barth.
results archives from commit-queue are too large to upload
diff --git a/Tools/Scripts/webkitpy/common/checkout/api.py b/Tools/Scripts/webkitpy/common/checkout/api.py
index 29e43d3..ab93c0b 100644
--- a/Tools/Scripts/webkitpy/common/checkout/api.py
+++ b/Tools/Scripts/webkitpy/common/checkout/api.py
@@ -54,11 +54,14 @@ class Checkout(object):
# contents_at_revision returns a byte array (str()), but we know
# that ChangeLog files are utf-8. parse_latest_entry_from_file
# expects a file-like object which vends unicode(), so we decode here.
- changelog_file = StringIO.StringIO(changelog_contents.decode("utf-8"))
+ # Old revisions of Sources/WebKit/wx/ChangeLog have some invalid utf8 characters.
+ changelog_file = StringIO.StringIO(changelog_contents.decode("utf-8", "ignore"))
return ChangeLog.parse_latest_entry_from_file(changelog_file)
def changelog_entries_for_revision(self, revision):
changed_files = self._scm.changed_files_for_revision(revision)
+ # FIXME: This gets confused if ChangeLog files are moved, as
+ # deletes are still "changed files" per changed_files_for_revision.
return [self._latest_entry_for_changelog_at_revision(path, revision) for path in changed_files if self.is_path_to_changelog(path)]
@memoized
diff --git a/Tools/Scripts/webkitpy/common/checkout/api_unittest.py b/Tools/Scripts/webkitpy/common/checkout/api_unittest.py
index 1f97abd..6dcec61 100644
--- a/Tools/Scripts/webkitpy/common/checkout/api_unittest.py
+++ b/Tools/Scripts/webkitpy/common/checkout/api_unittest.py
@@ -130,7 +130,9 @@ class CheckoutTest(unittest.TestCase):
self.assertEqual(revision, "bar")
# contents_at_revision is expected to return a byte array (str)
# so we encode our unicode ChangeLog down to a utf-8 stream.
- return _changelog1.encode("utf-8")
+ # The ChangeLog utf-8 decoding should ignore invalid codepoints.
+ invalid_utf8 = str(b"\255")
+ return _changelog1.encode("utf-8") + invalid_utf8
scm.contents_at_revision = mock_contents_at_revision
checkout = Checkout(scm)
entry = checkout._latest_entry_for_changelog_at_revision("foo", "bar")
diff --git a/Tools/Scripts/webkitpy/common/checkout/scm.py b/Tools/Scripts/webkitpy/common/checkout/scm.py
index 9cfdaa4..d5d29f5 100644
--- a/Tools/Scripts/webkitpy/common/checkout/scm.py
+++ b/Tools/Scripts/webkitpy/common/checkout/scm.py
@@ -439,6 +439,7 @@ class SVN(SCM):
def changed_files(self, git_commit=None):
status_command = ["svn", "status"]
status_command.extend(self._patch_directories)
+ # ACDMR: Addded, Conflicted, Deleted, Modified or Replaced
return self.run_status_and_extract_filenames(status_command, self._status_regexp("ACDMR"))
def changed_files_for_revision(self, revision):
@@ -704,7 +705,10 @@ class Git(SCM):
return self.remote_merge_base()
def changed_files(self, git_commit=None):
+ # FIXME: --diff-filter could be used to avoid the "extract_filenames" step.
status_command = ['git', 'diff', '-r', '--name-status', '-C', '-M', "--no-ext-diff", "--full-index", self.merge_base(git_commit)]
+ # FIXME: I'm not sure we're returning the same set of files that SVN.changed_files is.
+ # Added (A), Copied (C), Deleted (D), Modified (M), Renamed (R)
return self.run_status_and_extract_filenames(status_command, self._status_regexp("ADM"))
def _changes_files_for_commit(self, git_commit):
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list