prepare-ChangeLog doesn't find names of modified classes/methods in Python source files. It would be nice if it did this, as it would encourage writing more detailed ChangeLogs.
Created attachment 116226 [details] Teach prepare-ChangeLog how to find changed classes/methods/functions in Python files
Created attachment 116227 [details] Teach prepare-ChangeLog how to find changed classes/methods/functions in Python files
I tried to write unit tests for this following the model of the run-leaks tests. But trying to load prepare-ChangeLog as a module doesn't seem to work due to the global variables it uses.
Comment on attachment 116227 [details] Teach prepare-ChangeLog how to find changed classes/methods/functions in Python files View in context: https://bugs.webkit.org/attachment.cgi?id=116227&action=review This looks good to me. I have some minor nits. > Tools/ChangeLog:12 > + or that use python as their interpreter. Modified the code that extracts the interpreter to Nit: python => Python > Tools/ChangeLog:13 > + ignore an leading "/usr/bin/env " in the interpreter line, as is common for our Python Nit: an => a > Tools/Scripts/prepare-ChangeLog:1274 > + for (; $i < scalar(@scopeStack); ++$i) { Nit: scalar(@scopeStack) => @scopeStack It's unnecessary to call scalar() in this context. > Tools/Scripts/prepare-ChangeLog:1282 > + for ($i = 0; $i < scalar(@poppedScopes); ++$i) { Nit: scalar(@poppedScopes) => @poppedScopes > Tools/Scripts/prepare-ChangeLog:1283 > + my $lineAfterEnd = $i + 1 == scalar(@poppedScopes) ? $. : $poppedScopes[$i + 1]->{line}; Ditto. > Tools/Scripts/prepare-ChangeLog:1286 > + scalar(@scopeStack) or warn "Popped off last scope at $fileName:$.\n"; Ditto.
Comment on attachment 116227 [details] Teach prepare-ChangeLog how to find changed classes/methods/functions in Python files View in context: https://bugs.webkit.org/attachment.cgi?id=116227&action=review >> Tools/ChangeLog:12 >> + or that use python as their interpreter. Modified the code that extracts the interpreter to > > Nit: python => Python Here I was referring to "python" the utility, not Python the language. >> Tools/ChangeLog:13 >> + ignore an leading "/usr/bin/env " in the interpreter line, as is common for our Python > > Nit: an => a Fixed. >> Tools/Scripts/prepare-ChangeLog:1274 >> + for (; $i < scalar(@scopeStack); ++$i) { > > Nit: scalar(@scopeStack) => @scopeStack > > It's unnecessary to call scalar() in this context. Removed. >> Tools/Scripts/prepare-ChangeLog:1282 >> + for ($i = 0; $i < scalar(@poppedScopes); ++$i) { > > Nit: scalar(@poppedScopes) => @poppedScopes Removed. >> Tools/Scripts/prepare-ChangeLog:1283 >> + my $lineAfterEnd = $i + 1 == scalar(@poppedScopes) ? $. : $poppedScopes[$i + 1]->{line}; > > Ditto. Removed. >> Tools/Scripts/prepare-ChangeLog:1286 >> + scalar(@scopeStack) or warn "Popped off last scope at $fileName:$.\n"; > > Ditto. Removed.
Committed r101005: <http://trac.webkit.org/changeset/101005>