Title: [292573] trunk/Tools
Revision
292573
Author
[email protected]
Date
2022-04-07 15:44:09 -0700 (Thu, 07 Apr 2022)

Log Message

[Merge-Queue] Canonicalize parent commits
https://bugs.webkit.org/show_bug.cgi?id=238951
<rdar://problem/91436607>

Reviewed by Aakash Jain.

* Tools/CISupport/ews-build/steps.py:
(Canonicalize.run): Canonicalize first 2 parent commits if not rebasing.
(Canonicalize.getResultSummary): Pluralize summary.
* Tools/CISupport/ews-build/steps_unittest.py:

Canonical link: https://commits.webkit.org/249411@main

Modified Paths

Diff

Modified: trunk/Tools/CISupport/ews-build/steps.py (292572 => 292573)


--- trunk/Tools/CISupport/ews-build/steps.py	2022-04-07 22:41:56 UTC (rev 292572)
+++ trunk/Tools/CISupport/ews-build/steps.py	2022-04-07 22:44:09 UTC (rev 292573)
@@ -4912,7 +4912,7 @@
                 ['git', 'branch', '-f', base_ref, head_ref],
                 ['git', 'checkout', base_ref],
             ]
-        commands.append(['python3', 'Tools/Scripts/git-webkit', 'canonicalize', '-n', '1'])
+        commands.append(['python3', 'Tools/Scripts/git-webkit', 'canonicalize', '-n', '1' if self.rebase_enabled else '3'])
 
         for command in commands:
             self.commands.append(util.ShellArg(command=command, logname='stdio', haltOnFailure=True))
@@ -4920,10 +4920,11 @@
         return super(Canonicalize, self).run()
 
     def getResultSummary(self):
+        commit_pluralized = "commit" if self.rebase_enabled else "commits"
         if self.results == SUCCESS:
-            return {'step': 'Canonicalized commit'}
+            return {'step': f'Canonicalized {commit_pluralized}'}
         if self.results == FAILURE:
-            return {'step': 'Failed to canonicalize commit'}
+            return {'step': f'Failed to canonicalize {commit_pluralized}'}
         return super(Canonicalize, self).getResultSummary()
 
     def doStepIf(self, step):

Modified: trunk/Tools/CISupport/ews-build/steps_unittest.py (292572 => 292573)


--- trunk/Tools/CISupport/ews-build/steps_unittest.py	2022-04-07 22:41:56 UTC (rev 292572)
+++ trunk/Tools/CISupport/ews-build/steps_unittest.py	2022-04-07 22:44:09 UTC (rev 292573)
@@ -6147,10 +6147,10 @@
                 workdir='wkdir',
                 timeout=300,
                 logEnviron=False,
-                command=['python3', 'Tools/Scripts/git-webkit', 'canonicalize', '-n', '1'],
+                command=['python3', 'Tools/Scripts/git-webkit', 'canonicalize', '-n', '3'],
             ) + 0,
         )
-        self.expectOutcome(result=SUCCESS, state_string='Canonicalized commit')
+        self.expectOutcome(result=SUCCESS, state_string='Canonicalized commits')
         return self.runStep()
 
     def test_failure(self):

Modified: trunk/Tools/ChangeLog (292572 => 292573)


--- trunk/Tools/ChangeLog	2022-04-07 22:41:56 UTC (rev 292572)
+++ trunk/Tools/ChangeLog	2022-04-07 22:44:09 UTC (rev 292573)
@@ -1,5 +1,18 @@
 2022-04-07  Jonathan Bedard  <[email protected]>
 
+        [Merge-Queue] Canonicalize parent commits
+        https://bugs.webkit.org/show_bug.cgi?id=238951
+        <rdar://problem/91436607>
+
+        Reviewed by Aakash Jain.
+
+        * CISupport/ews-build/steps.py:
+        (Canonicalize.run): Canonicalize first 2 parent commits if not rebasing.
+        (Canonicalize.getResultSummary): Pluralize summary.
+        * CISupport/ews-build/steps_unittest.py:
+
+2022-04-07  Jonathan Bedard  <[email protected]>
+
         [Merge-Queue] Change label names
         https://bugs.webkit.org/show_bug.cgi?id=238950
         <rdar://problem/91435211>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to