[Webkit-unassigned] [Bug 107478] Add functions to ChangeLog - parse bug desc/changed functions, delete/prepend entries

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 21 16:13:47 PST 2013


https://bugs.webkit.org/show_bug.cgi?id=107478





--- Comment #5 from Timothy Loh <timloh at chromium.org>  2013-01-21 16:15:38 PST ---
(In reply to comment #4)
> (From update of attachment 183836 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=183836&action=review
> 
> > Tools/Scripts/webkitpy/common/checkout/changelog.py:167
> > +    @staticmethod
> > +    def _parse_touched_functions(text):
> 
> I have (perhaps irational) fear of python's static methods.  They are hard to mock/use-mocks-from.  I'd rather these be at least class methods if not just plain old instance methods.
> 
> > Tools/Scripts/webkitpy/common/checkout/changelog.py:198
> > +        self._bug_description = ChangeLogEntry._parse_bug_description(self._contents)
> 
> self. will make these easier to mock/test.
> 

Sure, I'll replace @staticmethod with @classmethod and ChangeLogEntry/ChangeLog with self throughout the file to make it uniform.

> > Tools/Scripts/webkitpy/common/checkout/changelog.py:171
> > +            file_match = re.match(ChangeLogEntry.touched_files_regexp, line)
> 
> can we call touched_files_regexp.match directly?  I thought the compiled regexp's had instance methods?  I guess the r'' syntax only gets you a regexp-aware string and not a compiled regexp?
> 

Yep, r'' stops backslashes from being escape characters.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list