Changeset 150939 in webkit
- Timestamp:
- May 29, 2013 6:07:22 PM (11 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r150924 r150939 1 2013-05-29 Ruth Fong <ruth_fong@apple.com> 2 3 prepare-Changelog should not be generating namespace-only or class-name-only lines like "(WebCore):" 4 https://bugs.webkit.org/show_bug.cgi?id=113221 5 6 Reviewed by Ryosuke Niwa. 7 8 Teach prepare-Changelog to not list the names of modified namespaces, 9 classes, or structs in C++ files. Thus, if a change is made 10 within a namespace/class/struct yet outside a function, it will 11 not be reflected in the ChangeLog entry. 12 See https://bugs.webkit.org/show_bug.cgi?id=113221#c8 13 for more details on how ChangeLog entries are affected. 14 15 * Scripts/prepare-ChangeLog: 16 (get_function_line_ranges_for_cpp): 17 (delete_namespaces_from_ranges_for_cpp): Added. 18 (is_function_in_namespace): Added. 19 * Scripts/webkitperl/prepare-ChangeLog_unittest/resources/cpp_unittests-expected.txt: Updated 20 to reflect revised definition of a function (i.e. excludes namespaces, classes, structs) 21 1 22 2013-05-29 Praveen R Jadhav <praveen.j@samsung.com> 2 23 -
trunk/Tools/Scripts/prepare-ChangeLog
r138259 r150939 84 84 sub get_function_line_ranges($$); 85 85 sub get_function_line_ranges_for_cpp($$); 86 sub delete_namespaces_from_ranges_for_cpp(\@\@); 87 sub is_function_in_namespace($$); 86 88 sub get_function_line_ranges_for_java($$); 87 89 sub get_function_line_ranges_for_javascript($$); … … 649 651 my $potential_namespace = ""; 650 652 my @namespaces; 653 my @all_namespaces; 651 654 652 655 while (<$file_handle>) { … … 812 815 if ($potential_namespace) { 813 816 push @namespaces, $potential_namespace; 817 push @all_namespaces, $potential_namespace; 814 818 $potential_namespace = ""; 815 819 $name = $namespaces[-1]; … … 927 931 warn "mismatched parentheses in $file_name\n" if $in_parentheses; 928 932 929 return @ranges; 930 } 931 933 return delete_namespaces_from_ranges_for_cpp(@ranges, @all_namespaces); 934 } 935 936 937 # Take in references to an array of line ranges for C functions in a given file 938 # and an array of namespaces declared in that file and return an updated 939 # list of line ranges with the namespaces removed. 940 941 sub delete_namespaces_from_ranges_for_cpp(\@\@) 942 { 943 my ($ranges, $namespaces) = @_; 944 return grep {!is_function_in_namespace($namespaces, $$_[2])} @$ranges; 945 } 946 947 948 sub is_function_in_namespace($$) 949 { 950 my ($namespaces, $function_name) = @_; 951 return grep {$_ eq $function_name} @$namespaces; 952 } 932 953 933 954 -
trunk/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/cpp_unittests-expected.txt
r106315 r150939 139 139 ], 140 140 [ 141 '158',142 '159',143 'Class1'144 ],145 [146 141 '162', 147 142 '164', … … 184 179 ], 185 180 [ 186 '204',187 '205',188 'Struct1'189 ],190 [191 181 '208', 192 182 '210', … … 199 189 ], 200 190 [ 201 '219',202 '219',203 'NameSpace1'204 ],205 [206 191 '220', 207 192 '222', … … 209 194 ], 210 195 [ 211 '223',212 '223',213 'NameSpace1'214 ],215 [216 '228',217 '228',218 'NameSpace2'219 ],220 [221 196 '229', 222 197 '231', … … 224 199 ], 225 200 [ 226 '232',227 '232',228 'NameSpace2'229 ],230 [231 '237',232 '240',233 'Class104'234 ],235 [236 '244',237 '249',238 'Class105'239 ],240 [241 '253',242 '254',243 'Class106'244 ],245 [246 201 '255', 247 202 '259', … … 249 204 ], 250 205 [ 251 '260',252 '261',253 'Class106'254 ],255 [256 206 '262', 257 207 '266', … … 259 209 ], 260 210 [ 261 '267',262 '268',263 'Class106'264 ],265 [266 '272',267 '273',268 'NameSpace3'269 ],270 [271 '275',272 '276',273 'NameSpace4'274 ],275 [276 '278',277 '279',278 'NameSpace3'279 ],280 [281 '283',282 '284',283 'NameSpace5'284 ],285 [286 '286',287 '287',288 'NameSpace6'289 ],290 [291 '289',292 '290',293 'Class107'294 ],295 [296 211 '291', 297 212 '295', … … 299 214 ], 300 215 [ 301 '296',302 '297',303 'Class107'304 ],305 [306 '299',307 '300',308 'NameSpace6'309 ],310 [311 '302',312 '303',313 'NameSpace5'314 ],315 [316 '307',317 '307',318 'Class108'319 ],320 [321 216 '308', 322 217 '320', 323 218 'Class108::func35' 324 219 ], 325 [326 '321',327 '321',328 'Class108'329 ],330 [331 '340',332 '354',333 'NameSpace7'334 ],335 [336 '356',337 '369',338 'NameSpace8'339 ],340 [341 '371',342 '371',343 'NameSpace7'344 ],345 [346 '373',347 '386',348 'Class109'349 ],350 [351 '388',352 '388',353 'NameSpace7'354 ]355 220 ] 356 221 }
Note: See TracChangeset
for help on using the changeset viewer.