Title: [274481] trunk/Tools
- Revision
- 274481
- Author
- commit-qu...@webkit.org
- Date
- 2021-03-16 09:05:55 -0700 (Tue, 16 Mar 2021)
Log Message
[prepare-ChangeLog] Assigning a multiline comment to a variable breaks change detection
https://bugs.webkit.org/show_bug.cgi?id=223225
Patch by Dean Johnson <dean_john...@apple.com> on 2021-03-16
Reviewed by Jonathan Bedard.
* Scripts/prepare-ChangeLog:
(get_function_line_ranges_for_python): Remove '^' prefix from regex so we match multiline
strings assigned to variables.
* Scripts/webkitperl/prepare-ChangeLog_unittest/resources/python_unittests-expected.txt:
* Scripts/webkitperl/prepare-ChangeLog_unittest/resources/python_unittests.py: Add multiline string
variable definition, which previously would cause prepare-ChangeLog to parse the remainder of the file
as a multiline comment. Also add a new test to ensure it's not skipped by multiline logic.
(Class8.__init__):
(Class9):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (274480 => 274481)
--- trunk/Tools/ChangeLog 2021-03-16 15:10:58 UTC (rev 274480)
+++ trunk/Tools/ChangeLog 2021-03-16 16:05:55 UTC (rev 274481)
@@ -1,3 +1,20 @@
+2021-03-16 Dean Johnson <dean_john...@apple.com>
+
+ [prepare-ChangeLog] Assigning a multiline comment to a variable breaks change detection
+ https://bugs.webkit.org/show_bug.cgi?id=223225
+
+ Reviewed by Jonathan Bedard.
+
+ * Scripts/prepare-ChangeLog:
+ (get_function_line_ranges_for_python): Remove '^' prefix from regex so we match multiline
+ strings assigned to variables.
+ * Scripts/webkitperl/prepare-ChangeLog_unittest/resources/python_unittests-expected.txt:
+ * Scripts/webkitperl/prepare-ChangeLog_unittest/resources/python_unittests.py: Add multiline string
+ variable definition, which previously would cause prepare-ChangeLog to parse the remainder of the file
+ as a multiline comment. Also add a new test to ensure it's not skipped by multiline logic.
+ (Class8.__init__):
+ (Class9):
+
2021-03-16 Carlos Alberto Lopez Perez <clo...@igalia.com>
[EWS] run-layout-tests-without-patch step should only retry the tests that failed on the previous steps.
Modified: trunk/Tools/Scripts/prepare-ChangeLog (274480 => 274481)
--- trunk/Tools/Scripts/prepare-ChangeLog 2021-03-16 15:10:58 UTC (rev 274480)
+++ trunk/Tools/Scripts/prepare-ChangeLog 2021-03-16 16:05:55 UTC (rev 274481)
@@ -1798,7 +1798,7 @@
my @ranges;
my $multilineStringLiteralSentinelRegEx = qr#(?:"""|''')#;
- my $multilineStringLiteralStartRegEx = qr#^\s*$multilineStringLiteralSentinelRegEx#;
+ my $multilineStringLiteralStartRegEx = qr#\s*$multilineStringLiteralSentinelRegEx#;
my $multilineStringLiteralEndRegEx = qr#$multilineStringLiteralSentinelRegEx\s*$#;
my @scopeStack = ({ line => 0, indent => -1, name => undef });
Modified: trunk/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/python_unittests-expected.txt (274480 => 274481)
--- trunk/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/python_unittests-expected.txt 2021-03-16 15:10:58 UTC (rev 274480)
+++ trunk/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/python_unittests-expected.txt 2021-03-16 16:05:55 UTC (rev 274481)
@@ -169,8 +169,13 @@
],
[
'142',
- '143',
+ '145',
'Class8.__init__'
],
+ [
+ '151',
+ '152',
+ 'Class9'
+ ],
]
}
Modified: trunk/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/python_unittests.py (274480 => 274481)
--- trunk/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/python_unittests.py 2021-03-16 15:10:58 UTC (rev 274480)
+++ trunk/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/python_unittests.py 2021-03-16 16:05:55 UTC (rev 274481)
@@ -141,3 +141,12 @@
"""
def __init__(self):
pass
+
+
+MULTILINE_STRING_VARIABLE = '''
+some text
+some more text
+'''
+
+class Class9:
+ pass
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes