Changeset 57531 in webkit


Ignore:
Timestamp:
Apr 13, 2010 2:28:21 PM (14 years ago)
Author:
eric@webkit.org
Message:

2010-04-13 Eric Seidel <eric@webkit.org>

Reviewed by David Levin.

the commit-queue hates Tor Arne Vestbø
https://bugs.webkit.org/show_bug.cgi?id=37511

We were failing to read reviewers out of ChangeLogs
when the reviewer has unicode characters in his/her name.
I fixed this by explicitly decoding from utf8 every time we
read in a ChangeLog file (they are always UTF8).

  • Scripts/webkitpy/common/checkout/changelog.py:
  • Scripts/webkitpy/common/checkout/changelog_unittest.py:
Location:
trunk/WebKitTools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r57525 r57531  
     12010-04-13  Eric Seidel  <eric@webkit.org>
     2
     3        Reviewed by David Levin.
     4
     5        the commit-queue hates Tor Arne Vestbø
     6        https://bugs.webkit.org/show_bug.cgi?id=37511
     7
     8        We were failing to read reviewers out of ChangeLogs
     9        when the reviewer has unicode characters in his/her name.
     10        I fixed this by explicitly decoding from utf8 every time we
     11        read in a ChangeLog file (they are always UTF8).
     12
     13        * Scripts/webkitpy/common/checkout/changelog.py:
     14        * Scripts/webkitpy/common/checkout/changelog_unittest.py:
     15
    1162010-04-13  Adam Roben  <aroben@apple.com>
    217
  • trunk/WebKitTools/Scripts/webkitpy/common/checkout/changelog.py

    r56985 r57531  
    2929# WebKit's Python module for parsing and modifying ChangeLog files
    3030
     31import codecs
    3132import fileinput # inplace file editing for set_reviewer_in_changelog
    3233import os.path
     
    116117
    117118    def latest_entry(self):
    118         changelog_file = open(self.path)
     119        # ChangeLog files are always UTF-8, we read them in as such to support Reviewers with unicode in their names.
     120        changelog_file = codecs.open(self.path, "r", "utf-8")
    119121        try:
    120122            return self.parse_latest_entry_from_file(changelog_file)
  • trunk/WebKitTools/Scripts/webkitpy/common/checkout/changelog_unittest.py

    r56985 r57531  
    3838class ChangeLogsTest(unittest.TestCase):
    3939
    40     _example_entry = '''2009-08-17  Peter Kasting  <pkasting@google.com>
     40    _example_entry = u'''2009-08-17  Peter Kasting  <pkasting@google.com>
    4141
    42         Reviewed by Steve Falkenburg.
     42        Reviewed by Tor Arne Vestb\xf8.
    4343
    4444        https://bugs.webkit.org/show_bug.cgi?id=27323
     
    9494        self.assertEquals(latest_entry.author_name(), "Peter Kasting")
    9595        self.assertEquals(latest_entry.author_email(), "pkasting@google.com")
    96         self.assertEquals(latest_entry.reviewer_text(), "Steve Falkenburg")
     96        self.assertEquals(latest_entry.reviewer_text(), u"Tor Arne Vestb\xf8")
     97        self.assertTrue(latest_entry.reviewer())  # Make sure that our UTF8-based lookup of Tor works.
    9798
    9899    @staticmethod
Note: See TracChangeset for help on using the changeset viewer.