| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2013 the V8 project authors. All rights reserved. | 2 # Copyright 2013 the V8 project authors. All rights reserved. |
| 3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
| 4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
| 5 # met: | 5 # met: |
| 6 # | 6 # |
| 7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
| 8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
| 9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
| 10 # copyright notice, this list of conditions and the following | 10 # copyright notice, this list of conditions and the following |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 | 98 |
| 99 def MakeChangeLogBody(commit_messages, auto_format=False): | 99 def MakeChangeLogBody(commit_messages, auto_format=False): |
| 100 result = "" | 100 result = "" |
| 101 added_titles = set() | 101 added_titles = set() |
| 102 for (title, body, author) in commit_messages: | 102 for (title, body, author) in commit_messages: |
| 103 # TODO(machenbach): Better check for reverts. A revert should remove the | 103 # TODO(machenbach): Better check for reverts. A revert should remove the |
| 104 # original CL from the actual log entry. | 104 # original CL from the actual log entry. |
| 105 title = title.strip() | 105 title = title.strip() |
| 106 if auto_format: | 106 if auto_format: |
| 107 # Only add commits that set the LOG flag correctly. | 107 # Only add commits that set the LOG flag correctly. |
| 108 log_exp = r"^[ \t]*LOG[ \t]*=[ \t]*(?:Y(?:ES)?)|TRUE" | 108 log_exp = r"^[ \t]*LOG[ \t]*=[ \t]*(?:(?:Y(?:ES)?)|TRUE)" |
| 109 if not re.search(log_exp, body, flags=re.I | re.M): | 109 if not re.search(log_exp, body, flags=re.I | re.M): |
| 110 continue | 110 continue |
| 111 # Never include reverts. | 111 # Never include reverts. |
| 112 if title.startswith("Revert "): | 112 if title.startswith("Revert "): |
| 113 continue | 113 continue |
| 114 # Don't include duplicates. | 114 # Don't include duplicates. |
| 115 if title in added_titles: | 115 if title in added_titles: |
| 116 continue | 116 continue |
| 117 | 117 |
| 118 # Add and format the commit's title and bug reference. Move dot to the end. | 118 # Add and format the commit's title and bug reference. Move dot to the end. |
| (...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 477 options, | 477 options, |
| 478 side_effect_handler=DEFAULT_SIDE_EFFECT_HANDLER): | 478 side_effect_handler=DEFAULT_SIDE_EFFECT_HANDLER): |
| 479 state = {} | 479 state = {} |
| 480 steps = [] | 480 steps = [] |
| 481 for (number, step_class) in enumerate(step_classes): | 481 for (number, step_class) in enumerate(step_classes): |
| 482 steps.append(MakeStep(step_class, number, state, config, | 482 steps.append(MakeStep(step_class, number, state, config, |
| 483 options, side_effect_handler)) | 483 options, side_effect_handler)) |
| 484 | 484 |
| 485 for step in steps[options.s:]: | 485 for step in steps[options.s:]: |
| 486 step.Run() | 486 step.Run() |
| OLD | NEW |