[webkit-patch] Post both revision and identifier to bugzilla
authorjbedard@apple.com <jbedard@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Feb 2021 20:38:03 +0000 (20:38 +0000)
committerjbedard@apple.com <jbedard@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Feb 2021 20:38:03 +0000 (20:38 +0000)
https://bugs.webkit.org/show_bug.cgi?id=221829
<rdar://problem/74282619>

Reviewed by Aakash Jain.

* Scripts/webkitpy/tool/commands/download_unittest.py:
* Scripts/webkitpy/tool/commands/upload_unittest.py:
* Scripts/webkitpy/tool/comments.py:
(bug_comment_from_svn_revision): Include subversion revision.
* Scripts/webkitpy/tool/steps/closebugforlanddiff_unittest.py:
(CloseBugForLandDiffTest.test_empty_state):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@272800 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/Scripts/webkitpy/tool/commands/download_unittest.py
Tools/Scripts/webkitpy/tool/commands/upload_unittest.py
Tools/Scripts/webkitpy/tool/comments.py
Tools/Scripts/webkitpy/tool/steps/closebugforlanddiff_unittest.py

index 322c3d5c8fcb18734511cc4ab83a8a0921f69b07..c767d5672a5971317ba9619edd3af7c8af81bd09 100644 (file)
@@ -1,3 +1,18 @@
+2021-02-12  Jonathan Bedard  <jbedard@apple.com>
+
+        [webkit-patch] Post both revision and identifier to bugzilla
+        https://bugs.webkit.org/show_bug.cgi?id=221829
+        <rdar://problem/74282619>
+
+        Reviewed by Aakash Jain.
+
+        * Scripts/webkitpy/tool/commands/download_unittest.py:
+        * Scripts/webkitpy/tool/commands/upload_unittest.py:
+        * Scripts/webkitpy/tool/comments.py:
+        (bug_comment_from_svn_revision): Include subversion revision.
+        * Scripts/webkitpy/tool/steps/closebugforlanddiff_unittest.py:
+        (CloseBugForLandDiffTest.test_empty_state):
+
 2021-02-12  Jonathan Bedard  <jbedard@apple.com>
 
         [webkit-patch] Use identifiers when posting to bugzilla (Follow-up fix)
index 6b168c13f17eef78afb455bb09a253592efbeca8..59b29035ebb1ed483fb5d5456ce970f5e004a1ec 100644 (file)
@@ -194,7 +194,7 @@ MOCK run_and_throw_if_fail: ['mock-run-javacriptcore-tests'], cwd=/mock-checkout
 Running run-webkit-tests
 MOCK run_and_throw_if_fail: ['mock-run-webkit-tests', '--quiet'], cwd=/mock-checkout
 Committed r49824: <https://commits.webkit.org/r49824>
-Committed 5@main: <https://commits.webkit.org/5@main>
+Committed r49824 (5@main): <https://commits.webkit.org/5@main>
 No bug id provided.
 """
         with self.mock_svn_remote():
@@ -323,7 +323,7 @@ Committed r49824: <https://commits.webkit.org/r49824>
 Commenting without closing bug 50000
 MOCK bug comment: bug_id=50000, cc=None, see_also=None
 --- Begin comment ---
-Committed 5@main: <https://commits.webkit.org/5@main>
+Committed r49824 (5@main): <https://commits.webkit.org/5@main>
 --- End comment ---
 
 """
@@ -494,7 +494,7 @@ MOCK reopen_bug 50000 with comment 'Reverted r852 for reason:
 
 Reason
 
-Committed 5@main: <https://commits.webkit.org/5@main>'
+Committed r49824 (5@main): <https://commits.webkit.org/5@main>'
 """
         with self.mock_svn_remote():
             self.assert_execute_outputs(Revert(), [852, "Reason", "Description"], options=self._default_options(), expected_logs=expected_logs)
@@ -514,12 +514,12 @@ MOCK reopen_bug 50000 with comment 'Reverted r852 and r963 for reason:
 
 Reason
 
-Committed 5@main: <https://commits.webkit.org/5@main>'
+Committed r49824 (5@main): <https://commits.webkit.org/5@main>'
 MOCK reopen_bug 50005 with comment 'Reverted r852 and r963 for reason:
 
 Reason
 
-Committed 5@main: <https://commits.webkit.org/5@main>'
+Committed r49824 (5@main): <https://commits.webkit.org/5@main>'
 """
         with self.mock_svn_remote():
             self.assert_execute_outputs(Revert(), ["852 963", "Reason", "Description"], options=self._default_options(), expected_logs=expected_logs)
@@ -537,17 +537,17 @@ MOCK reopen_bug 50000 with comment 'Reverted r852, r963, and r3001 for reason:
 
 Reason
 
-Committed 5@main: <https://commits.webkit.org/5@main>'
+Committed r49824 (5@main): <https://commits.webkit.org/5@main>'
 MOCK reopen_bug 50005 with comment 'Reverted r852, r963, and r3001 for reason:
 
 Reason
 
-Committed 5@main: <https://commits.webkit.org/5@main>'
+Committed r49824 (5@main): <https://commits.webkit.org/5@main>'
 MOCK reopen_bug 50004 with comment 'Reverted r852, r963, and r3001 for reason:
 
 Reason
 
-Committed 5@main: <https://commits.webkit.org/5@main>'
+Committed r49824 (5@main): <https://commits.webkit.org/5@main>'
 """
         with self.mock_svn_remote():
             self.assert_execute_outputs(Revert(), ["852 3001 963", "Reason", "Description"], options=self._default_options(), expected_logs=expected_logs)
@@ -565,12 +565,12 @@ MOCK reopen_bug 50000 with comment 'Reverted r852, r963, and r999 for reason:
 
 Reason
 
-Committed 5@main: <https://commits.webkit.org/5@main>'
+Committed r49824 (5@main): <https://commits.webkit.org/5@main>'
 MOCK reopen_bug 50005 with comment 'Reverted r852, r963, and r999 for reason:
 
 Reason
 
-Committed 5@main: <https://commits.webkit.org/5@main>'
+Committed r49824 (5@main): <https://commits.webkit.org/5@main>'
 """
         with self.mock_svn_remote():
             self.assert_execute_outputs(Revert(), ["852 999 963", "Reason", "Description"], options=self._default_options(), expected_logs=expected_logs)
index 1d8a277d7110acfffce1669af047b41cc2585a1a..964de0c28ef7038717174d4ef066ac93e6964dda 100644 (file)
@@ -202,7 +202,7 @@ MOCK bug comment: bug_id=50000, cc=None, see_also=None
 --- Begin comment ---
 MOCK comment
 
-Committed 5@main: <https://commits.webkit.org/5@main>
+Committed r9876 (5@main): <https://commits.webkit.org/5@main>
 --- End comment ---
 
 """
index 584d1a55282e4240782cb3be9305e50cde21ccda..98c8834942caf5dd840cb757d2c0b340b9f247f1 100644 (file)
@@ -37,7 +37,7 @@ from webkitscmpy import remote
 def bug_comment_from_svn_revision(svn_revision):
     repo = remote.Svn('https://svn.webkit.org/repository/webkit')
     identifier = str(repo.commit(revision=svn_revision)).replace('trunk', 'main')
-    return "Committed {}: <{}>".format(identifier, urls.view_identifier_url(identifier))
+    return 'Committed r{} ({}): <{}>'.format(svn_revision, identifier, urls.view_identifier_url(identifier))
 
 
 def bug_comment_from_commit_text(scm, commit_text):
index 55d99bf4f58c0beb0c768e54435865336cb08c7b..decd8961c0ef28ec3879e0b3b7e0c27d052789a9 100644 (file)
@@ -59,5 +59,5 @@ class CloseBugForLandDiffTest(unittest.TestCase):
                 step.run(dict(commit_text='Mock commit text'))
             self.assertEqual(
                 captured.root.log.getvalue(),
-                'Committed 5@main: <https://commits.webkit.org/5@main>\nNo bug id provided.\n'
+                'Committed r49824 (5@main): <https://commits.webkit.org/5@main>\nNo bug id provided.\n'
             )