[Webkit-unassigned] [Bug 28477] WebKit needs a changelogs.py to hold changelog-related code

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 20 14:56:27 PDT 2009


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





--- Comment #4 from Eric Seidel <eric at webkit.org>  2009-08-20 14:56:26 PDT ---
(In reply to comment #3)
> (From update of attachment 35167 [details])
> A few things to consider..
> 
> > diff --git a/WebKitTools/Scripts/modules/changelogs.py b/WebKitTools/Scripts/modules/changelogs.py
> > +# Copyright (c) 2009, Google Inc. All rights reserved.
> (C)

Done.

> > +import fileinput # inplace file editing for set_reviewer_in_changelog
> > +import re
> > +
> 
> > +# This doesn't really belong in this file, but we don't have a better home for it yet.
> FIXME:

Done.


> > +            if ChangeLog.date_line_regexp.match(line):
> > +                return ''.join(entry_lines[0:-1]) # Remove the extra newline at the end
> 
> Indexes at the boundary need not be listed, so it could be
>   return ''.join(entry_lines[:-1]) # Remove the extra newline at the end.
> 
> However, I feel mildly paranoid about the blank line, so why not be slight more
> robust line this?

>   if not entry_lines[-1].strip():
>       entry_lines = entry_lines[:-1]
>   return ''.join(entry_lines) # Remove the extra newline at the end.

I think I'll leave it as-is for now.  It's unit tested and can be incrementally
improved later.

> > +    def update_for_revert(self, revision):
> > +        reviewed_by_regexp = re.compile('Reviewed by NOBODY \(OOPS!\)\.')
> > +        removing_boilerplate = False
> > +        # inplace=1 creates a backup file and re-directs stdout to the file
> > +        for line in fileinput.FileInput(self.path, inplace=1):
> > +            if re.search(reviewed_by_regexp, line):
> reviewed_by_regexp.search(...
> 
> > +                print re.sub(reviewed_by_regexp, "No review, rolling out r%s." % revision, line),
> reviewed_by_regexp.sub(...
> 
> 
> 
> > +                print "        %s\n" % view_source_url(revision)
> > +                # Remove all the ChangeLog boiler plate between the Reviewed by line and the first changed file.
> s/boiler plate/boilerplate/

Fixed! :)

Will re-post shortly.

-- 
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