Changeset 95547 in webkit


Ignore:
Timestamp:
Sep 20, 2011 9:31:16 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

ChangeLogEntry class should contain a list of touched files
https://bugs.webkit.org/show_bug.cgi?id=68115

Patch by Leandro Pereira <leandro@profusion.mobi> on 2011-09-20
Reviewed by Eric Seidel.

Add method to return the list of files touched in a ChangeLog entry.

  • Scripts/webkitpy/common/checkout/changelog.py: Add

touched_files_regexp and touched_files() method.

  • Scripts/webkitpy/common/checkout/changelog_unittest.py: Implement

unit tests for touched_files() method.

Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r95544 r95547  
     12011-09-20  Leandro Pereira  <leandro@profusion.mobi>
     2
     3        ChangeLogEntry class should contain a list of touched files
     4        https://bugs.webkit.org/show_bug.cgi?id=68115
     5
     6        Reviewed by Eric Seidel.
     7       
     8        Add method to return the list of files touched in a ChangeLog entry.
     9
     10        * Scripts/webkitpy/common/checkout/changelog.py: Add
     11        touched_files_regexp and touched_files() method.
     12        * Scripts/webkitpy/common/checkout/changelog_unittest.py: Implement
     13        unit tests for touched_files() method.
     14
    1152011-09-20  Sheriff Bot  <webkit.review.bot@gmail.com>
    216
  • trunk/Tools/Scripts/webkitpy/common/checkout/changelog.py

    r90239 r95547  
    7575    date_line_regexp = r'^(?P<date>\d{4}-\d{2}-\d{2})\s+(?P<name>.+?)\s+<(?P<email>[^<>]+)>$'
    7676
     77    # e.g. * Source/WebCore/page/EventHandler.cpp: Implement FooBarQuux.
     78    touched_files_regexp = r'\s*\*\s*(?P<file>.+)\:'
     79
    7780    # e.g. == Rolled over to ChangeLog-2011-02-16 ==
    7881    rolled_over_regexp = r'^== Rolled over to ChangeLog-\d{4}-\d{2}-\d{2} ==$'
     
    98101        self._author = self._committer_list.contributor_by_email(self._author_email) or self._committer_list.contributor_by_name(self._author_name)
    99102
     103        self._touched_files = re.findall(self.touched_files_regexp, self._contents, re.MULTILINE)
     104
    100105    def author_name(self):
    101106        return self._author_name
     
    120125    def bug_id(self):
    121126        return parse_bug_id_from_changelog(self._contents)
     127
     128    def touched_files(self):
     129        return self._touched_files
    122130
    123131
  • trunk/Tools/Scripts/webkitpy/common/checkout/changelog_unittest.py

    r91724 r95547  
    162162        self.assertEquals(latest_entry.author_email(), "pkasting@google.com")
    163163        self.assertEquals(latest_entry.reviewer_text(), u"Tor Arne Vestb\xf8")
     164        self.assertEquals(latest_entry.touched_files(), ["Scripts/modules/cpp_style.py", "Scripts/modules/cpp_style_unittest.py"])
    164165        self.assertTrue(latest_entry.reviewer())  # Make sure that our UTF8-based lookup of Tor works.
    165166
Note: See TracChangeset for help on using the changeset viewer.