[webkit-changes] [295777] trunk/Tools/CISupport/ews-build

2022-06-23 Thread jbedard
Title: [295777] trunk/Tools/CISupport/ews-build








Revision 295777
Author jbed...@apple.com
Date 2022-06-23 09:14:06 -0700 (Thu, 23 Jun 2022)


Log Message
[Merge-Queue] Commit directly to GitHub
https://bugs.webkit.org/show_bug.cgi?id=241899


Reviewed by Aakash Jain.

* Tools/CISupport/ews-build/factories.py:
(CommitQueueFactory.__init__): Remove git-svn steps.
(MergeQueueFactoryBase.__init__): Ditto.
(MergeQueueFactory.__init__): Update pull-request before pushing commit to main.
(UnsafeMergeQueueFactory.__init__): Ditto.
* Tools/CISupport/ews-build/factories_unittest.py:
(TestExpectedBuildSteps):
* Tools/CISupport/ews-build/steps.py:
(PushCommitToWebKitRepo):
(PushCommitToWebKitRepo.__init__):
(PushCommitToWebKitRepo.start): Push commit to 'origin'.
(PushCommitToWebKitRepo.evaluateCommand): Remove git-svn, replace revision with hash.
Pull requests are updated before landing instead of after.
(PushCommitToWebKitRepo.hash_from_commit_text): Extract hash from git command.
(DetermineLandedIdentifier.evaluateCommand): Use hash instead of revision.
(DetermineLandedIdentifier.url_for_hash_details): Ditto.
(DetermineLandedIdentifier.identifier_for_hash): Ditto.
(DetermineLandedIdentifier.comment_text_for_bug): Use hash instead of revision, use
identifier as the default commit format.
(Canonicalize.run): Delete identifiers.json to ensure canonicalization is correct,
reset the commit and author time.
(PushCommitToWebKitRepo.svn_revision_from_commit_text): Deleted.
(DetermineLandedIdentifier.url_for_revision_details): Deleted.
(DetermineLandedIdentifier.identifier_for_revision): Deleted.
(AddAuthorToCommitMessage): Deleted.
(GitSvnFetch): Deleted.
(ResetGitSvn): Deleted.
(DetermineAuthor): Deleted.
* Tools/CISupport/ews-build/steps_unittest.py:

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

Modified Paths

trunk/Tools/CISupport/ews-build/factories.py
trunk/Tools/CISupport/ews-build/factories_unittest.py
trunk/Tools/CISupport/ews-build/steps.py
trunk/Tools/CISupport/ews-build/steps_unittest.py




Diff

Modified: trunk/Tools/CISupport/ews-build/factories.py (295776 => 295777)

--- trunk/Tools/CISupport/ews-build/factories.py	2022-06-23 12:43:18 UTC (rev 295776)
+++ trunk/Tools/CISupport/ews-build/factories.py	2022-06-23 16:14:06 UTC (rev 295777)
@@ -24,15 +24,15 @@
 from buildbot.process import factory
 from buildbot.steps import trigger
 
-from steps import (AddAuthorToCommitMessage, AddReviewerToCommitMessage, ApplyPatch, ApplyWatchList, Canonicalize, CommitPatch,
+from steps import (AddReviewerToCommitMessage, ApplyPatch, ApplyWatchList, Canonicalize, CommitPatch,
CheckOutPullRequest, CheckOutSource, CheckOutSpecificRevision, CheckChangeRelevance,
CheckPatchStatusOnEWSQueues, CheckStyle, CleanGitRepo, CompileJSC, CompileWebKit, ConfigureBuild,
-   DetermineAuthor, DownloadBuiltProduct, ExtractBuiltProduct, FetchBranches, FindModifiedLayoutTests, GitSvnFetch,
-   InstallGtkDependencies, InstallWpeDependencies, KillOldProcesses, PrintConfiguration, PushCommitToWebKitRepo,
+   DownloadBuiltProduct, ExtractBuiltProduct, FetchBranches, FindModifiedLayoutTests,
+   InstallGtkDependencies, InstallWpeDependencies, KillOldProcesses, PrintConfiguration, PushCommitToWebKitRepo, PushPullRequestBranch,
RunAPITests, RunBindingsTests, RunBuildWebKitOrgUnitTests, RunBuildbotCheckConfigForBuildWebKit, RunBuildbotCheckConfigForEWS,
RunEWSUnitTests, RunResultsdbpyTests, RunJavaScriptCoreTests, RunWebKit1Tests, RunWebKitPerlTests, RunWebKitPyPython2Tests,
RunWebKitPyPython3Tests, RunWebKitTests, RunWebKitTestsRedTree, RunWebKitTestsInStressMode, RunWebKitTestsInStressGuardmallocMode,
-   SetBuildSummary, ShowIdentifier, TriggerCrashLogSubmission, UpdateWorkingDirectory,
+   SetBuildSummary, ShowIdentifier, TriggerCrashLogSubmission, UpdateWorkingDirectory, UpdatePullRequest,
ValidateCommitMessage, ValidateChange, ValidateCommitterAndReviewer, WaitForCrashCollection,
InstallBuiltProduct, ValidateSquashed)
 
@@ -294,7 +294,6 @@
 self.addStep(PrintConfiguration())
 self.addStep(CleanGitRepo())
 self.addStep(CheckOutSource())
-self.addStep(GitSvnFetch())  # FIXME: Remove when migrating to pure git
 self.addStep(FetchBranches())
 self.addStep(ShowIdentifier())
 self.addStep(UpdateWorkingDirectory())
@@ -302,8 +301,6 @@
 
 self.addStep(ValidateSquashed())
 self.addStep(AddReviewerToCommitMessage())
-self.addStep(DetermineAuthor())
-self.addStep(AddAuthorToCommitMessage())
 self.addStep(ValidateCommitMessage())
 
 self.addStep(KillOldProcesses())
@@ -328,7 +325,6 @@
 self.addStep(PrintConfiguration())
 self.addStep(CleanGitRepo())
 self.addStep(CheckOutSource())
-  

[webkit-changes] [295761] trunk/Tools/Scripts/libraries

2022-06-22 Thread jbedard
Title: [295761] trunk/Tools/Scripts/libraries








Revision 295761
Author jbed...@apple.com
Date 2022-06-22 18:02:14 -0700 (Wed, 22 Jun 2022)


Log Message
git-webkit land should apply the merge-queue label
https://bugs.webkit.org/show_bug.cgi?id=240308


Reviewed by Ryan Haddad.

* Tools/Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/arguments.py:
(NoAction.__call__): Support --un along with --no- to invert option.
* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/land.py:
(Land.parser): Invoke PullRequest's parser.
(Land.merge_queue): Update (or create) pull-request and add merge-queue label to.
(Land.main): Support PullRequest options including automatic commit creation, squashing and PR creation.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:
(PullRequest): Add merge-queue and unsafe-merge-queue labels.
(PullRequest.parser): Add --no-squash option.
(PullRequest.create_pull_request): Remove merge-queue labels, allow caller to specify a callback.
(PullRequest.main): Create commit even when squashing.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/land_unittest.py:
(repository):
(TestLand.test_with_oops):
(TestLand.test_default):
(TestLand.test_canonicalize):
(TestLand.test_svn):
(TestLand.test_default_with_radar):
(TestLand.test_canonicalize_with_bugzilla):
(TestLand.test_svn_with_bugzilla):
(TestLandGitHub.webserver):
(TestLandGitHub):
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/revert_unittest.py:
(test_update):
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/squash_unittest.py:
(TestSquash.test_github_with_previous_history):
(TestSquash.test_github_without_previous_history):

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

Modified Paths

trunk/Tools/Scripts/libraries/webkitcorepy/setup.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/arguments.py
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/land.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/land_unittest.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/revert_unittest.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/squash_unittest.py




Diff

Modified: trunk/Tools/Scripts/libraries/webkitcorepy/setup.py (295760 => 295761)

--- trunk/Tools/Scripts/libraries/webkitcorepy/setup.py	2022-06-23 00:51:40 UTC (rev 295760)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/setup.py	2022-06-23 01:02:14 UTC (rev 295761)
@@ -30,7 +30,7 @@
 
 setup(
 name='webkitcorepy',
-version='0.13.9',
+version='0.13.10',
 description='Library containing various Python support classes and functions.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py (295760 => 295761)

--- trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py	2022-06-23 00:51:40 UTC (rev 295760)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py	2022-06-23 01:02:14 UTC (rev 295761)
@@ -44,7 +44,7 @@
 from webkitcorepy.editor import Editor
 from webkitcorepy.file_lock import FileLock
 
-version = Version(0, 13, 9)
+version = Version(0, 13, 10)
 
 from webkitcorepy.autoinstall import Package, AutoInstall
 if sys.version_info > (3, 0):


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/arguments.py (295760 => 295761)

--- trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/arguments.py	2022-06-23 00:51:40 UTC (rev 295760)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/arguments.py	2022-06-23 01:02:14 UTC (rev 295761)
@@ -31,7 +31,7 @@
 super(NoAction, self).__init__(option_strings, dest, nargs=0, **kwargs)
 
 def __call__(self, parser, namespace, values, option_string=None):
-setattr(namespace, self.dest, False if option_string.startswith('--no') else True)
+setattr(namespace, self.dest, False if option_string.startswith('--no') or option_string.startswith('--un') else True)
 
 
 def CountAction(value=1):


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (295760 => 295761)

--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-06-23 00:51:40 UTC (rev 295760)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-06-23 01:02:14 UTC (rev 295761)
@@ -29,7 +29,7 @@
 
 setup(
 

[webkit-changes] [295745] trunk

2022-06-22 Thread jbedard
Title: [295745] trunk








Revision 295745
Author jbed...@apple.com
Date 2022-06-22 12:43:03 -0700 (Wed, 22 Jun 2022)


Log Message
[git-webkit] Redact certain bug details
https://bugs.webkit.org/show_bug.cgi?id=241833


Reviewed by Ryan Haddad.

* Tools/Scripts/libraries/webkitbugspy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/bugzilla.py:
(Tracker.__init__): Pass redaction map to base class.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/github.py:
(Tracker.__init__): Ditto.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/issue.py:
(Issue.redacted): Check if the issue matches any redaction filters.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/radar.py:
(Tracker.__init__): Pass redaction map to base class.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/bugzilla_unittest.py:
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/github_unittest.py:
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/radar_unittest.py:
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tracker.py:
(Tracker.from_json): Pass redaction map if it's defined.
(Tracker.__init__): Populate redaction map with regexes.
* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py:
(Branch.main): Redact branch name if the issue is a redacted configuration.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/commit.py:
(Commit.main): Redact issue title if the issue is a redacted configuration.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:
* metadata/trackers.json: Redact all radars and security bugs.

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

Modified Paths

trunk/Tools/Scripts/libraries/webkitbugspy/setup.py
trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py
trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/bugzilla.py
trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/github.py
trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/issue.py
trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/radar.py
trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/bugzilla_unittest.py
trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/github_unittest.py
trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/radar_unittest.py
trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tracker.py
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/commit.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py
trunk/metadata/trackers.json




Diff

Modified: trunk/Tools/Scripts/libraries/webkitbugspy/setup.py (295744 => 295745)

--- trunk/Tools/Scripts/libraries/webkitbugspy/setup.py	2022-06-22 19:25:25 UTC (rev 295744)
+++ trunk/Tools/Scripts/libraries/webkitbugspy/setup.py	2022-06-22 19:43:03 UTC (rev 295745)
@@ -30,7 +30,7 @@
 
 setup(
 name='webkitbugspy',
-version='0.6.4',
+version='0.7.0',
 description='Library containing a shared API for various bug trackers.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py (295744 => 295745)

--- trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py	2022-06-22 19:25:25 UTC (rev 295744)
+++ trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py	2022-06-22 19:43:03 UTC (rev 295745)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(0, 6, 4)
+version = Version(0, 7, 0)
 
 from .user import User
 from .issue import Issue


Modified: trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/bugzilla.py (295744 => 295745)

--- trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/bugzilla.py	2022-06-22 19:25:25 UTC (rev 295744)
+++ trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/bugzilla.py	2022-06-22 19:43:03 UTC (rev 295745)
@@ -56,8 +56,8 @@
 raise TypeError('Cannot invoke parent class when classmethod')
 return super(Tracker.Encoder, context).default(obj)
 
-def __init__(self, url, users=None, res=None, login_attempts=3):
-super(Tracker, self).__init__(users=users)
+def __init__(self, url, users=None, res=None, login_attempts=3, redact=None):
+super(Tracker, self).__init__(users=users, redact=redact)
 
 self._logins_left = login_attempts + 1 if login_attempts else 1
 match = self.ROOT_RE.match(url)


Modified: trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/github.py (295744 => 295745)

--- 

[webkit-changes] [295738] trunk/Tools/CISupport/ews-build

2022-06-22 Thread jbedard
Title: [295738] trunk/Tools/CISupport/ews-build








Revision 295738
Author jbed...@apple.com
Date 2022-06-22 11:02:36 -0700 (Wed, 22 Jun 2022)


Log Message
[ews-build.webkit.org] Remove check-github-integrity (Part 1)
https://bugs.webkit.org/show_bug.cgi?id=241859


Reviewed by Ryan Haddad.

* Tools/CISupport/ews-build/factories.py:
(CommitQueueFactory.__init__): Remove VerifyGitHubIntegrity.
(MergeQueueFactoryBase.__init__): Ditto.
* Tools/CISupport/ews-build/factories_unittest.py:
(TestExpectedBuildSteps):
* Tools/CISupport/ews-build/steps.py:
(VerifyGitHubIntegrity): Deleted.
* Tools/CISupport/ews-build/steps_unittest.py:

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

Modified Paths

trunk/Tools/CISupport/ews-build/factories.py
trunk/Tools/CISupport/ews-build/factories_unittest.py
trunk/Tools/CISupport/ews-build/steps.py
trunk/Tools/CISupport/ews-build/steps_unittest.py




Diff

Modified: trunk/Tools/CISupport/ews-build/factories.py (295737 => 295738)

--- trunk/Tools/CISupport/ews-build/factories.py	2022-06-22 17:57:21 UTC (rev 295737)
+++ trunk/Tools/CISupport/ews-build/factories.py	2022-06-22 18:02:36 UTC (rev 295738)
@@ -34,7 +34,7 @@
RunWebKitPyPython3Tests, RunWebKitTests, RunWebKitTestsRedTree, RunWebKitTestsInStressMode, RunWebKitTestsInStressGuardmallocMode,
SetBuildSummary, ShowIdentifier, TriggerCrashLogSubmission, UpdateWorkingDirectory,
ValidateCommitMessage, ValidateChange, ValidateCommitterAndReviewer, WaitForCrashCollection,
-   InstallBuiltProduct, VerifyGitHubIntegrity, ValidateSquashed)
+   InstallBuiltProduct, ValidateSquashed)
 
 
 class Factory(factory.BuildFactory):
@@ -297,7 +297,6 @@
 self.addStep(GitSvnFetch())  # FIXME: Remove when migrating to pure git
 self.addStep(FetchBranches())
 self.addStep(ShowIdentifier())
-self.addStep(VerifyGitHubIntegrity())
 self.addStep(UpdateWorkingDirectory())
 self.addStep(CommitPatch())
 
@@ -332,7 +331,6 @@
 self.addStep(GitSvnFetch())  # FIXME: Remove when migrating to pure git
 self.addStep(FetchBranches())
 self.addStep(ShowIdentifier())
-self.addStep(VerifyGitHubIntegrity())
 self.addStep(UpdateWorkingDirectory())
 self.addStep(CheckOutPullRequest())
 self.addStep(ValidateSquashed())


Modified: trunk/Tools/CISupport/ews-build/factories_unittest.py (295737 => 295738)

--- trunk/Tools/CISupport/ews-build/factories_unittest.py	2022-06-22 17:57:21 UTC (rev 295737)
+++ trunk/Tools/CISupport/ews-build/factories_unittest.py	2022-06-22 18:02:36 UTC (rev 295738)
@@ -607,7 +607,6 @@
 'git-svn-fetch',
 'fetch-branch-references',
 'show-identifier',
-'verify-github-integrity',
 'update-working-directory',
 'commit-patch',
 'validate-squashed',
@@ -636,7 +635,6 @@
 'git-svn-fetch',
 'fetch-branch-references',
 'show-identifier',
-'verify-github-integrity',
 'update-working-directory',
 'checkout-pull-request',
 'validate-squashed',
@@ -662,7 +660,6 @@
 'git-svn-fetch',
 'fetch-branch-references',
 'show-identifier',
-'verify-github-integrity',
 'update-working-directory',
 'checkout-pull-request',
 'validate-squashed',


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

--- trunk/Tools/CISupport/ews-build/steps.py	2022-06-22 17:57:21 UTC (rev 295737)
+++ trunk/Tools/CISupport/ews-build/steps.py	2022-06-22 18:02:36 UTC (rev 295738)
@@ -4708,37 +4708,6 @@
 return None
 
 
-# FIXME: Only needed when GitHub is a mirror, remove once GitHub is the source of truth
-class VerifyGitHubIntegrity(shell.ShellCommand):
-command = ['python3', 'Tools/Scripts/check-github-mirror-integrity']
-name = 'verify-github-integrity'
-haltOnFailure = True
-
-def __init__(self, **kwargs):
-super(VerifyGitHubIntegrity, self).__init__(logEnviron=False, **kwargs)
-
-def getResultSummary(self):
-if self.results != SUCCESS:
-return {'step': 'GitHub integrity check failed'}
-return {'step': 'Verified GitHub integrity'}
-
-def evaluateCommand(self, cmd):
-rc = shell.ShellCommand.evaluateCommand(self, cmd)
-if rc != SUCCESS:
-self.send_email_for_github_issue()
-return rc
-
-def send_email_for_github_issue(self):
-try:
-builder_name = self.getProperty('buildername', '')
-build_url = '{}#/builders/{}/builds/{}'.format(self.master.config.buildbotURL, self.build._builderid, self.build.number)
-email_subject = 'URGENT: GitHub integrity check failed'
-email_text = 'URGENT issue on github repository. Integrity check failed.\n\nBuild: {}\n\nBuilder: 

[webkit-changes] [295643] trunk

2022-06-17 Thread jbedard
Title: [295643] trunk








Revision 295643
Author jbed...@apple.com
Date 2022-06-17 13:33:59 -0700 (Fri, 17 Jun 2022)


Log Message
[git-webkit] Add WebKit-security remote
https://bugs.webkit.org/show_bug.cgi?id=241647


Reviewed by Stephanie Lewis.

* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py:
(Setup.github): Don't add remote postfix if repo name already has the remote postfix.
* metadata/git_config_extension: Add WebKit-security remote.

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

Modified Paths

trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py
trunk/metadata/git_config_extension




Diff

Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (295642 => 295643)

--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-06-17 19:06:35 UTC (rev 295642)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-06-17 20:33:59 UTC (rev 295643)
@@ -29,7 +29,7 @@
 
 setup(
 name='webkitscmpy',
-version='5.0.1',
+version='5.0.2',
 description='Library designed to interact with git and svn repositories.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (295642 => 295643)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-06-17 19:06:35 UTC (rev 295642)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-06-17 20:33:59 UTC (rev 295643)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(5, 0, 1)
+version = Version(5, 0, 2)
 
 AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
 AutoInstall.register(Package('jinja2', Version(2, 11, 3)))


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py (295642 => 295643)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py	2022-06-17 19:06:35 UTC (rev 295642)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py	2022-06-17 20:33:59 UTC (rev 295643)
@@ -60,7 +60,7 @@
 sys.stderr.write('You are not a member of {}\n'.format(team))
 sys.stderr.write('Created "{}" fork will not be accessible to other contributors\n'.format(remote))
 
-forked_name = '{}{}'.format(repository.name, '-{}'.format(remote) if remote else '')
+forked_name = '{}{}'.format(repository.name, '-{}'.format(remote) if remote and not repository.name.endswith(remote) else '')
 log.info('Verifying user owned fork...')
 response = requests.get('{}/repos/{}/{}'.format(
 repository.api_url,


Modified: trunk/metadata/git_config_extension (295642 => 295643)

--- trunk/metadata/git_config_extension	2022-06-17 19:06:35 UTC (rev 295642)
+++ trunk/metadata/git_config_extension	2022-06-17 20:33:59 UTC (rev 295643)
@@ -8,7 +8,9 @@
 [webkitscmpy "remotes"]
 origin = g...@github.com:WebKit/WebKit.git
 apple = g...@github.com:apple/WebKit.git
+security = g...@github.com:WebKit/WebKit-security.git
 [webkitscmpy "access"]
 apple = apple/teams/WebKit
+security = WebKit/teams/security
 [webkitscmpy "pre-pr"]
 style-checker = python3 Tools/Scripts/check-webkit-style






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [295637] trunk/Tools/CISupport/ews-build

2022-06-17 Thread jbedard
Title: [295637] trunk/Tools/CISupport/ews-build








Revision 295637
Author jbed...@apple.com
Date 2022-06-17 09:23:05 -0700 (Fri, 17 Jun 2022)


Log Message
[ews-build.webkit.org] Seperate authentication for EWS and Merge-Queue
https://bugs.webkit.org/show_bug.cgi?id=241698


Reviewed by Aakash Jain.

* Tools/CISupport/ews-build/events.py:
(Events.sendDataToGitHub): Allow caller to pick a different set of GitHub credentials.
(Events.buildFinishedGitHub): Pick GitHub credentials specific to builder.
(Events.stepStartedGitHub): Ditto.
* Tools/CISupport/ews-build/steps.py:
(GitHub):
(GitHub.user_for_queue): Map buildername to GitHub user.
(GitHub.credentials): Allow caller to pick a different set of GitHub credentials.
(GitHubMixin.fetch_data_from_url_with_authentication_github): Pick GitHub credentials
specific to builder.
(GitHubMixin.add_label): Ditto.
(GitHubMixin.remove_labels): Ditto.
(GitHubMixin.comment_on_pr): Ditto.
(GitHubMixin.update_pr): Ditto.
(GitHubMixin.close_pr): Ditto.
(CheckOutPullRequest.run): Ditto.
(PushPullRequestBranch.start): Ditto.
* Tools/CISupport/ews-build/steps_unittest.py:

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

Modified Paths

trunk/Tools/CISupport/ews-build/events.py
trunk/Tools/CISupport/ews-build/steps.py
trunk/Tools/CISupport/ews-build/steps_unittest.py




Diff

Modified: trunk/Tools/CISupport/ews-build/events.py (295636 => 295637)

--- trunk/Tools/CISupport/ews-build/events.py	2022-06-17 15:45:24 UTC (rev 295636)
+++ trunk/Tools/CISupport/ews-build/events.py	2022-06-17 16:23:05 UTC (rev 295637)
@@ -116,8 +116,8 @@
 
 agent.request(b'POST', self.EVENT_SERVER_ENDPOINT, Headers({'Content-Type': ['application/json']}), body)
 
-def sendDataToGitHub(self, repository, sha, data):
-username, access_token = GitHub.credentials()
+def sendDataToGitHub(self, repository, sha, data, user=None):
+username, access_token = GitHub.credentials(user=user)
 
 data['description'] = data.get('description', '')
 if len(data['description']) > self.MAX_GITHUB_DESCRIPTION:
@@ -196,7 +196,7 @@
 description=build.get('state_string'),
 context=build['description'] + custom_suffix,
 )
-self.sendDataToGitHub(repository, sha, data_to_send)
+self.sendDataToGitHub(repository, sha, data_to_send, user=GitHub.user_for_queue(self.extractProperty(build, 'buildername')))
 
 @defer.inlineCallbacks
 def buildFinished(self, key, build):
@@ -259,7 +259,7 @@
 description=state_string,
 context=builder.get('description', '?') + custom_suffix,
 )
-self.sendDataToGitHub(repository, sha, data_to_send)
+self.sendDataToGitHub(repository, sha, data_to_send, user=GitHub.user_for_queue(self.extractProperty(build, 'buildername')))
 
 @defer.inlineCallbacks
 def stepStarted(self, key, step):


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

--- trunk/Tools/CISupport/ews-build/steps.py	2022-06-17 15:45:24 UTC (rev 295636)
+++ trunk/Tools/CISupport/ews-build/steps.py	2022-06-17 16:23:05 UTC (rev 295637)
@@ -76,11 +76,19 @@
 
 
 class GitHub(object):
+_cache = {}
+
 @classmethod
 def repository_urls(cls):
 return [GITHUB_URL + project for project in GITHUB_PROJECTS]
 
 @classmethod
+def user_for_queue(cls, queue):
+if queue.lower() in ['commit-queue', 'merge-queue', 'unsafe-merge-queue']:
+return 'merge-queue'
+return None
+
+@classmethod
 def pr_url(cls, pr_number, repository_url=None):
 if not repository_url:
 repository_url = '{}{}'.format(GITHUB_URL, GITHUB_PROJECTS[0])
@@ -120,14 +128,21 @@
 return '{}/statuses/{}'.format(api_url, sha)
 
 @classmethod
-def credentials(cls):
+def credentials(cls, user=None):
+prefix = f"GITHUB_COM_{user.upper().replace('-', '_')}_" if user else 'GITHUB_COM_'
+
+if prefix in cls._cache:
+return cls._cache[prefix]
+
 try:
 passwords = json.load(open('passwords.json'))
-return passwords.get('GITHUB_COM_USERNAME', None), passwords.get('GITHUB_COM_ACCESS_TOKEN', None)
+cls._cache[prefix] = passwords.get(f'{prefix}USERNAME', None), passwords.get(f'{prefix}ACCESS_TOKEN', None)
 except Exception as e:
 print('Error reading GitHub credentials')
-return None, None
+cls._cache[prefix] = None, None
 
+return cls._cache[prefix]
+
 @classmethod
 def email_for_owners(cls, owners):
 if not owners:
@@ -147,7 +162,7 @@
 def fetch_data_from_url_with_authentication_github(self, url):
 response = None
 try:
-username, access_token = GitHub.credentials()
+username, access_token = GitHub.credentials(user=GitHub.user_for_queue(self.getProperty('buildername', '')))
 auth = HTTPBasicAuth(username, access_token) if 

[webkit-changes] [295634] trunk/Tools/CISupport/ews-build

2022-06-17 Thread jbedard
Title: [295634] trunk/Tools/CISupport/ews-build








Revision 295634
Author jbed...@apple.com
Date 2022-06-17 08:22:00 -0700 (Fri, 17 Jun 2022)


Log Message
[ews-build.webkit.org] Support periods in reviewer name
https://bugs.webkit.org/show_bug.cgi?id=241706

Reviewed by Aakash Jain.

* Tools/CISupport/ews-build/steps.py:
(ValidateCommitMessage):
(ValidateCommitMessage.extract_reviewers): Support reviewers with periods in their name.
* Tools/CISupport/ews-build/steps_unittest.py:
(mock_load_contributors):

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

Modified Paths

trunk/Tools/CISupport/ews-build/steps.py
trunk/Tools/CISupport/ews-build/steps_unittest.py




Diff

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

--- trunk/Tools/CISupport/ews-build/steps.py	2022-06-17 13:35:02 UTC (rev 295633)
+++ trunk/Tools/CISupport/ews-build/steps.py	2022-06-17 15:22:00 UTC (rev 295634)
@@ -4922,7 +4922,7 @@
 )
 RE_CHANGELOG = br'^(\+\+\+)\s+(.*ChangeLog.*)'
 BY_RE = re.compile(r'.+\s+by\s+(.+)$')
-SPLIT_RE = re.compile(r'(,\s*)|( and )|\.')
+SPLIT_RE = re.compile(r'(,\s*)|( and )')
 
 def __init__(self, **kwargs):
 super(ValidateCommitMessage, self).__init__(logEnviron=False, timeout=60, **kwargs)
@@ -4939,7 +4939,7 @@
 continue
 for person in cls.SPLIT_RE.split(match.group(1)):
 if person and not cls.SPLIT_RE.match(person):
-reviewers.add(person)
+reviewers.add(person.rstrip('.'))
 return reviewers, stripped_text
 
 def is_reviewer(self, name):


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

--- trunk/Tools/CISupport/ews-build/steps_unittest.py	2022-06-17 13:35:02 UTC (rev 295633)
+++ trunk/Tools/CISupport/ews-build/steps_unittest.py	2022-06-17 15:22:00 UTC (rev 295634)
@@ -81,6 +81,7 @@
 'commit...@webkit.org': {'name': 'WebKit Committer', 'status': 'committer', 'email': 'commit...@webkit.org'},
 'webkit-commit-queue': {'name': 'WebKit Committer', 'status': 'committer', 'email': 'commit...@webkit.org'},
 'WebKit Committer': {'status': 'committer'},
+'Myles C. Maxfield': {'status': 'reviewer'},
 }, []
 
 
@@ -5967,7 +5968,7 @@
 + 0, ExpectShell(workdir='wkdir',
 logEnviron=False,
 timeout=60,
-command=['/bin/sh', '-c', "git log HEAD ^origin/main | grep '\\(Reviewed by\\|Rubber-stamped by\\|Rubber stamped by\\)'"])
+command=['/bin/sh', '-c', "git log HEAD ^origin/main | grep '\\(Reviewed by\\|Rubber-stamped by\\|Rubber stamped by\\)' || true"])
 + 0
 + ExpectShell.log('stdio', stdout='Reviewed by WebKit Reviewer.\n'),
 )
@@ -5992,7 +5993,7 @@
 + 0, ExpectShell(workdir='wkdir',
 logEnviron=False,
 timeout=60,
-command=['/bin/sh', '-c', "git log eng/pull-request-branch ^main | grep '\\(Reviewed by\\|Rubber-stamped by\\|Rubber stamped by\\)'"])
+command=['/bin/sh', '-c', "git log eng/pull-request-branch ^main | grep '\\(Reviewed by\\|Rubber-stamped by\\|Rubber stamped by\\)' || true"])
 + 0
 + ExpectShell.log('stdio', stdout='Reviewed by WebKit Reviewer.\n'),
 )
@@ -5999,6 +6000,31 @@
 self.expectOutcome(result=SUCCESS, state_string='Validated commit message')
 return self.runStep()
 
+def test_success_period(self):
+self.setupStep(ValidateCommitMessage())
+ValidateCommitMessage._files = lambda x: ['+++ Tools/CISupport/ews-build/steps.py']
+self.setProperty('github.number', '1234')
+self.setProperty('github.base.ref', 'main')
+self.setProperty('github.head.ref', 'eng/pull-request-branch')
+self.expectRemoteCommands(
+ExpectShell(workdir='wkdir',
+logEnviron=False,
+timeout=60,
+command=['/bin/sh', '-c', "git log eng/pull-request-branch ^main | grep -q 'OO*PP*S!' && echo 'Commit message contains (OOPS!)' || test $? -eq 1"])
++ 0, ExpectShell(workdir='wkdir',
+logEnviron=False,
+timeout=60,
+command=['/bin/sh', '-c', "git log eng/pull-request-branch ^main | grep -q '\\(Reviewed by\\|Rubber-stamped by\\|Rubber stamped by\\|Unreviewed\\)' || echo 'No reviewer information in commit message'"])
++ 0, ExpectShell(workdir='wkdir',
+logEnviron=False,
+timeout=60,
+command=['/bin/sh', '-c', "git log eng/pull-request-branch ^main | grep '\\(Reviewed by\\|Rubber-stamped by\\|Rubber stamped by\\)' || true"])
++ 0
++ ExpectShell.log('stdio', stdout='Reviewed by Myles C. Maxfield.\n'),
+ 

[webkit-changes] [295612] trunk/Tools/Scripts/libraries

2022-06-16 Thread jbedard
Title: [295612] trunk/Tools/Scripts/libraries








Revision 295612
Author jbed...@apple.com
Date 2022-06-16 13:45:19 -0700 (Thu, 16 Jun 2022)


Log Message
[webkitcorepy] Validate cached credentials
https://bugs.webkit.org/show_bug.cgi?id=241664


Reviewed by Aakash Jain.

* Tools/Scripts/libraries/webkitbugspy/setup.py: Bumpv version.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/mocks/github.py: Add user endpoint.
* Tools/Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/credentials.py:
(credentials): Validate cached credentials, do not reload credentials which fail validation
from the keychain.

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

Modified Paths

trunk/Tools/Scripts/libraries/webkitbugspy/setup.py
trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py
trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/mocks/github.py
trunk/Tools/Scripts/libraries/webkitcorepy/setup.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/credentials.py




Diff

Modified: trunk/Tools/Scripts/libraries/webkitbugspy/setup.py (295611 => 295612)

--- trunk/Tools/Scripts/libraries/webkitbugspy/setup.py	2022-06-16 20:41:38 UTC (rev 295611)
+++ trunk/Tools/Scripts/libraries/webkitbugspy/setup.py	2022-06-16 20:45:19 UTC (rev 295612)
@@ -30,7 +30,7 @@
 
 setup(
 name='webkitbugspy',
-version='0.6.3',
+version='0.6.4',
 description='Library containing a shared API for various bug trackers.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py (295611 => 295612)

--- trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py	2022-06-16 20:41:38 UTC (rev 295611)
+++ trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py	2022-06-16 20:45:19 UTC (rev 295612)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(0, 6, 3)
+version = Version(0, 6, 4)
 
 from .user import User
 from .issue import Issue


Modified: trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/mocks/github.py (295611 => 295612)

--- trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/mocks/github.py	2022-06-16 20:41:38 UTC (rev 295611)
+++ trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/mocks/github.py	2022-06-16 20:45:19 UTC (rev 295612)
@@ -285,6 +285,13 @@
 if match and method == 'GET':
 return self._user(url, match.group('username'))
 
+match = re.match(r'{}/user$'.format(self.hosts[1]), stripped_url)
+if match and method == 'GET':
+user = self.users.get(auth.username) if auth else None
+if not user:
+return mocks.Response.create404(url=""
+return self._user(url, user.username)
+
 match = re.match(r'{}/issues/(?P\d+)$'.format(self.api_remote), stripped_url)
 if match and method in ('GET', 'PATCH'):
 return self._issue(url, int(match.group('id')), data="" if method == 'PATCH' else None)


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/setup.py (295611 => 295612)

--- trunk/Tools/Scripts/libraries/webkitcorepy/setup.py	2022-06-16 20:41:38 UTC (rev 295611)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/setup.py	2022-06-16 20:45:19 UTC (rev 295612)
@@ -30,7 +30,7 @@
 
 setup(
 name='webkitcorepy',
-version='0.13.8',
+version='0.13.9',
 description='Library containing various Python support classes and functions.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py (295611 => 295612)

--- trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py	2022-06-16 20:41:38 UTC (rev 295611)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py	2022-06-16 20:45:19 UTC (rev 295612)
@@ -44,7 +44,7 @@
 from webkitcorepy.editor import Editor
 from webkitcorepy.file_lock import FileLock
 
-version = Version(0, 13, 8)
+version = Version(0, 13, 9)
 
 from webkitcorepy.autoinstall import Package, AutoInstall
 if sys.version_info > (3, 0):


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/credentials.py (295611 => 295612)

--- trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/credentials.py	2022-06-16 20:41:38 UTC (rev 295611)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/credentials.py	2022-06-16 20:45:19 UTC (rev 295612)
@@ -32,10 +32,18 @@
 def credentials(url, required=True, name=None, prompt=None, key_name='password', validater=None, validate_existing_credentials=False, retry=3, save_in_keyring=None):
 global _cache
 
+ignore_entry = False
 name = name or 

[webkit-changes] [295599] trunk/Tools/CISupport/ews-build/steps.py

2022-06-16 Thread jbedard
Title: [295599] trunk/Tools/CISupport/ews-build/steps.py








Revision 295599
Author jbed...@apple.com
Date 2022-06-16 11:06:45 -0700 (Thu, 16 Jun 2022)


Log Message
[Merge-Queue] Validate reviewers in commit message (Follow-up)
https://bugs.webkit.org/show_bug.cgi?id=240718


Unreviewed infrastructure fix.

* Tools/CISupport/ews-build/steps.py:
(ValidateCommitMessage.run): Allow for unreviewed changes.

Modified Paths

trunk/Tools/CISupport/ews-build/steps.py




Diff

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

--- trunk/Tools/CISupport/ews-build/steps.py	2022-06-16 17:32:25 UTC (rev 295598)
+++ trunk/Tools/CISupport/ews-build/steps.py	2022-06-16 18:06:45 UTC (rev 295599)
@@ -4970,7 +4970,7 @@
 "git log {} ^{} | grep -q '\\({}\\)' || echo 'No reviewer information in commit message'".format(
 head_ref, base_ref,
 '\\|'.join(self.REVIEWED_STRINGS),
-), "git log {} ^{} | grep '\\({}\\)'".format(
+), "git log {} ^{} | grep '\\({}\\)' || true".format(
 head_ref, base_ref,
 '\\|'.join(self.REVIEWED_STRINGS[:-1]),
 ),






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [295592] trunk/Tools/CISupport/ews-build/steps.py

2022-06-16 Thread jbedard
Title: [295592] trunk/Tools/CISupport/ews-build/steps.py








Revision 295592
Author jbed...@apple.com
Date 2022-06-16 07:46:31 -0700 (Thu, 16 Jun 2022)


Log Message
[ews-build.webkit.org] Support WebKit/WebKit-security
https://bugs.webkit.org/show_bug.cgi?id=241656


Reviewed by Ryan Haddad and Aakash Jain.

* Tools/CISupport/ews-build/steps.py:

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

Modified Paths

trunk/Tools/CISupport/ews-build/steps.py




Diff

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

--- trunk/Tools/CISupport/ews-build/steps.py	2022-06-16 14:37:43 UTC (rev 295591)
+++ trunk/Tools/CISupport/ews-build/steps.py	2022-06-16 14:46:31 UTC (rev 295592)
@@ -57,7 +57,7 @@
 WithProperties = properties.WithProperties
 Interpolate = properties.Interpolate
 GITHUB_URL = 'https://github.com/'
-GITHUB_PROJECTS = ['WebKit/WebKit', 'apple/WebKit']
+GITHUB_PROJECTS = ['WebKit/WebKit', 'apple/WebKit', 'WebKit/WebKit-security']
 HASH_LENGTH_TO_DISPLAY = 8
 DEFAULT_BRANCH = 'main'
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [295540] trunk

2022-06-14 Thread jbedard
Title: [295540] trunk








Revision 295540
Author jbed...@apple.com
Date 2022-06-14 15:14:47 -0700 (Tue, 14 Jun 2022)


Log Message
[git-webkit] Automatically grant team access to private forks
https://bugs.webkit.org/show_bug.cgi?id=240819


Reviewed by Stephanie Lewis.

* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/github.py:
(Tracker): Share ACCEPT_HEADER string.
(Tracker.credentials.validater): Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py:
(Setup.github): Allow provided team access to forked repository.
(Setup.git): Pass team for repo access from webkitscmpy.access config value.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py:
(GitHub): Share ACCEPT_HEADER string.
(GitHub.PRGenerator.create): Ditto.
(GitHub.PRGenerator.update): Ditto.
(GitHub.request): Ditto.
* metadata/git_config_extension: Define group to have access to apple/WebKit forks.

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

Modified Paths

trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/github.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py
trunk/metadata/git_config_extension




Diff

Modified: trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/github.py (295539 => 295540)

--- trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/github.py	2022-06-14 21:59:59 UTC (rev 295539)
+++ trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/github.py	2022-06-14 22:14:47 UTC (rev 295540)
@@ -48,6 +48,7 @@
 REFRESH_TOKEN_PROMPT = "Is your API token out of date? Run 'git-webkit setup' to refresh credentials\n"
 DEFAULT_COMPONENT_COLOR = 'FF'
 DEFAULT_VERSION_COLOR = 'EE'
+ACCEPT_HEADER = 'application/vnd.github.v3+json'
 
 
 class Encoder(GenericTracker.Encoder):
@@ -105,7 +106,7 @@
 return False
 response = self.session.get(
 '{}/user'.format(self.api_url),
-headers=dict(Accept='application/vnd.github.v3+json'),
+headers=dict(Accept=self.ACCEPT_HEADER),
 auth=HTTPBasicAuth(username, access_token),
 )
 expiration = response.headers.get('github-authentication-token-expiration', None)
@@ -144,7 +145,7 @@
 
 def request(self, path=None, params=None, method='GET', headers=None, authenticated=None, paginate=True, json=None, error_message=None):
 headers = {key: value for key, value in headers.items()} if headers else dict()
-headers['Accept'] = headers.get('Accept', 'application/vnd.github.v3+json')
+headers['Accept'] = headers.get('Accept', self.ACCEPT_HEADER)
 
 username, access_token = self.credentials(required=bool(authenticated))
 auth = HTTPBasicAuth(username, access_token) if username and access_token else None
@@ -196,7 +197,7 @@
 url = ''.format(api_url=self.api_url, username=username)
 response = self.session.get(
 url, auth=HTTPBasicAuth(*self.credentials(required=True)),
-headers=dict(Accept='application/vnd.github.v3+json'),
+headers=dict(Accept=self.ACCEPT_HEADER),
 )
 if response.status_code // 100 != 2:
 sys.stderr.write("Request to '{}' returned status code '{}'\n".format(url, response.status_code))


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py (295539 => 295540)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py	2022-06-14 21:59:59 UTC (rev 295539)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py	2022-06-14 22:14:47 UTC (rev 295540)
@@ -37,7 +37,7 @@
 help = 'Configure local settings for the current repository'
 
 @classmethod
-def github(cls, args, repository, additional_setup=None, remote=None, **kwargs):
+def github(cls, args, repository, additional_setup=None, remote=None, team=None, **kwargs):
 log.info('Saving GitHub credentials in system credential store...')
 username, access_token = repository.credentials(required=True, validate=True, save_in_keyring=True)
 log.info('GitHub credentials saved via Keyring!')
@@ -47,16 +47,54 @@
 if additional_setup:
 result += additional_setup(args, repository)
 
+team_id = None
+auth = HTTPBasicAuth(username, access_token)
+if team:
+response = requests.get('{}/orgs/{}'.format(
+repository.api_url,
+team,
+), auth=auth, headers=dict(Accept=repository.ACCEPT_HEADER))
+if response.status_code == 200:
+team_id = response.json().get('id', None)
+else:
+sys.stderr.write('You are not a member of {}\n'.format(team))
+sys.stderr.write('Created "{}" fork will not be accessible to other contributors\n'.format(remote))
+
 forked_name = 

[webkit-changes] [295470] trunk/Tools/Scripts/libraries/webkitscmpy

2022-06-10 Thread jbedard
Title: [295470] trunk/Tools/Scripts/libraries/webkitscmpy








Revision 295470
Author jbed...@apple.com
Date 2022-06-10 18:33:15 -0700 (Fri, 10 Jun 2022)


Log Message
[git-webkit] Make the default rebase behavior for `git-webkit pr` configurable
https://bugs.webkit.org/show_bug.cgi?id=239385


Reviewed by Dewei Zhu.

* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:
(PullRequest.main): Check the webkitscmpy.auto-rebase-branch option to determine
if we should automatically rebase the branch.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py:
(Setup.git): Prompt user to set the automatic rebase behavior.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/setup_unittest.py:

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

Modified Paths

trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/setup_unittest.py




Diff

Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (295469 => 295470)

--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-06-11 00:35:48 UTC (rev 295469)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-06-11 01:33:15 UTC (rev 295470)
@@ -29,7 +29,7 @@
 
 setup(
 name='webkitscmpy',
-version='5.0.0',
+version='5.0.1',
 description='Library designed to interact with git and svn repositories.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (295469 => 295470)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-06-11 00:35:48 UTC (rev 295469)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-06-11 01:33:15 UTC (rev 295470)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(5, 0, 0)
+version = Version(5, 0, 1)
 
 AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
 AutoInstall.register(Package('jinja2', Version(2, 11, 3)))


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py (295469 => 295470)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py	2022-06-11 00:35:48 UTC (rev 295469)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py	2022-06-11 01:33:15 UTC (rev 295470)
@@ -267,7 +267,11 @@
 sys.stderr.write("'{}' is not a remote in this repository\n".format(source_remote))
 return 1
 
-rebasing = args.rebase or (args.rebase is None and repository.config().get('pull.rebase'))
+rebasing = args.rebase if args.rebase is not None else repository.config().get(
+'webkitscmpy.auto-rebase-branch',
+repository.config().get('pull.rebase', 'true'),
+) == 'true'
+
 if rebasing:
 log.info("Rebasing '{}' on '{}'...".format(repository.branch, branch_point.branch))
 if repository.pull(rebase=True, branch=branch_point.branch):


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py (295469 => 295470)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py	2022-06-11 00:35:48 UTC (rev 295469)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py	2022-06-11 01:33:15 UTC (rev 295470)
@@ -250,6 +250,25 @@
 sys.stderr.write('Failed to use {} as the merge strategy for this repository\n'.format('merge commits' if args.merge else 'rebase'))
 result += 1
 
+need_prompt_auto_update = args.all or not local_config.get('webkitscmpy.auto-rebase-branch')
+if not args.merge and not args.defaults and need_prompt_auto_update:
+log.info('Setting auto update on PR creation...')
+response = Terminal.choose(
+'Would you like to automatically rebase your branch when creating or\nupdating a pull request?',
+default='Yes', options=('Yes', 'No', 'Later'),
+)
+if response in ['Yes', 'No']:
+if run(
+[local.Git.executable(), 'config', 'webkitscmpy.auto-rebase-branch', 'true' if response == 'Yes' else 'false'],
+capture_output=True, cwd=repository.root_path,
+).returncode:
+sys.stderr.write('Failed to {} auto update\n'.format('enable' if response == 'Yes' else 'disable'))
+result += 1
+else:
+log.info('{} auto update on PR creation'.format('Enabled' if response == 'Yes' else 'Disabled'))
+   

[webkit-changes] [295469] trunk/Tools/Scripts/webkitperl/VCSUtils_unittest/ mergeChangeLogs.pl

2022-06-10 Thread jbedard
Title: [295469] trunk/Tools/Scripts/webkitperl/VCSUtils_unittest/mergeChangeLogs.pl








Revision 295469
Author jbed...@apple.com
Date 2022-06-10 17:35:48 -0700 (Fri, 10 Jun 2022)


Log Message
[webkitperl] Remove ChangeLog test
https://bugs.webkit.org/show_bug.cgi?id=241481

Reviewed by Aakash J.

* Tools/Scripts/webkitperl/VCSUtils_unittest/mergeChangeLogs.pl: Removed.

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

Removed Paths

trunk/Tools/Scripts/webkitperl/VCSUtils_unittest/mergeChangeLogs.pl




Diff

Deleted: trunk/Tools/Scripts/webkitperl/VCSUtils_unittest/mergeChangeLogs.pl (295468 => 295469)

--- trunk/Tools/Scripts/webkitperl/VCSUtils_unittest/mergeChangeLogs.pl	2022-06-10 23:26:43 UTC (rev 295468)
+++ trunk/Tools/Scripts/webkitperl/VCSUtils_unittest/mergeChangeLogs.pl	2022-06-11 00:35:48 UTC (rev 295469)
@@ -1,336 +0,0 @@
-#!/usr/bin/env perl
-#
-# Copyright (C) 2010 Apple Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1.  Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2.  Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 
-# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
-# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
-# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-# Unit tests of VCSUtils::mergeChangeLogs().
-
-use strict;
-
-use Test::Simple tests => 16;
-use File::Temp qw(tempfile);
-use VCSUtils;
-
-# Read contents of a file and return it.
-sub readFile($)
-{
-my ($fileName) = @_;
-
-local $/;
-open(FH, "<", $fileName);
-my $content = ;
-close(FH);
-
-return $content;
-}
-
-# Write a temporary file and return the filename.
-sub writeTempFile($$$)
-{
-my ($name, $extension, $content) = @_;
-
-my ($FH, $fileName) = tempfile(
-$name . "-",
-DIR => ($ENV{'TMPDIR'} || $ENV{'TEMP'} || "/tmp"),
-UNLINK => 0,
-);
-print $FH $content;
-close $FH;
-
-if ($extension) {
-my $newFileName = $fileName . $extension;
-rename($fileName, $newFileName);
-$fileName = $newFileName;
-}
-
-return $fileName;
-}
-
-# 
-
-{
-# New test
-my $title = "mergeChangeLogs: traditional rejected patch success";
-
-my $fileNewerContent = <<'EOF';
-2010-01-29  Mark Rowe  
-
-Fix the Mac build.
-
-Disable ENABLE_INDEXED_DATABASE since it is "completely non-functional".
-
-2010-01-29  Simon Hausmann  
-
-Rubber-stamped by Maciej Stachowiak.
-
-Fix the ARM build.
-EOF
-my $fileNewer = writeTempFile("file", "", $fileNewerContent);
-
-my $fileMineContent = <<'EOF';
-***
-*** 1,3 
-  2010-01-29  Simon Hausmann  
-  
-  Rubber-stamped by Maciej Stachowiak.
 1,9 
-+ 2010-01-29  Oliver Hunt  
-+ 
-+ Reviewed by Darin Adler.
-+ 
-+ JSC is failing to propagate anonymous slot count on some transitions
-+ 
-  2010-01-29  Simon Hausmann  
-  
-  Rubber-stamped by Maciej Stachowiak.
-EOF
-my $fileMine = writeTempFile("file", ".rej", $fileMineContent);
-rename($fileMine, $fileNewer . ".rej");
-$fileMine = $fileNewer . ".rej";
-
-my $fileOlderContent = $fileNewerContent;
-my $fileOlder = writeTempFile("file", ".orig", $fileOlderContent);
-rename($fileOlder, $fileNewer . ".orig");
-$fileOlder = $fileNewer . ".orig";
-
-my $exitStatus = mergeChangeLogs($fileMine, $fileOlder, $fileNewer);
-
-# mergeChangeLogs() should return 1 since the patch succeeded.
-ok($exitStatus == 1, "$title: should return 1 for success");
-
-ok(readFile($fileMine) eq $fileMineContent, "$title: \$fileMine should be unchanged");
-ok(readFile($fileOlder) eq $fileOlderContent, "$title: \$fileOlder should be unchanged");
-
-my $expectedContent = <<'EOF';
-2010-01-29  Oliver Hunt  
-
-Reviewed by Darin Adler.
-
-JSC is failing to propagate anonymous slot count on some transitions
-
-EOF
-

[webkit-changes] [295467] trunk/Tools/CISupport/ews-build

2022-06-10 Thread jbedard
Title: [295467] trunk/Tools/CISupport/ews-build








Revision 295467
Author jbed...@apple.com
Date 2022-06-10 16:10:44 -0700 (Fri, 10 Jun 2022)


Log Message
[EWS] Remove extra space from GitHub PR description links
https://bugs.webkit.org/show_bug.cgi?id=241522


Reviewed by Ryan Haddad.

* Tools/CISupport/ews-build/steps.py:
(UpdatePullRequest): Port changes from 250718@main to EWS.
(UpdatePullRequest.escape_html):
* Tools/CISupport/ews-build/steps_unittest.py:

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

Modified Paths

trunk/Tools/CISupport/ews-build/steps.py
trunk/Tools/CISupport/ews-build/steps_unittest.py




Diff

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

--- trunk/Tools/CISupport/ews-build/steps.py	2022-06-10 22:45:06 UTC (rev 295466)
+++ trunk/Tools/CISupport/ews-build/steps.py	2022-06-10 23:10:44 UTC (rev 295467)
@@ -5111,7 +5111,7 @@
 ESCAPE_TABLE = {
 '"': '',
 "'": '',
-'>': ' ',
+'>': '',
 '<': '',
 '&': '',
 }
@@ -5126,7 +5126,7 @@
 @classmethod
 def escape_html(cls, message):
 message = ''.join(cls.ESCAPE_TABLE.get(c, c) for c in message)
-return re.sub(r'(https?://[^\s<>,:;]+)', r'+return re.sub(r'(https?://[^\s<>,:;]+?)(?=[\s<>,:;]|())', r' 
 def __init__(self, **kwargs):
 super(UpdatePullRequest, self).__init__(logEnviron=False, timeout=300, **kwargs)


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

--- trunk/Tools/CISupport/ews-build/steps_unittest.py	2022-06-10 22:45:06 UTC (rev 295466)
+++ trunk/Tools/CISupport/ews-build/steps_unittest.py	2022-06-10 23:10:44 UTC (rev 295467)
@@ -6317,7 +6317,7 @@
 
 [Merge-Queue] Add http credential helper
 -rdar://problem/91044821 
+rdar://problem/91044821
 
 Reviewed by NOBODY (OOPS!).
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [295401] trunk/Tools/Scripts/libraries/webkitcorepy

2022-06-08 Thread jbedard
Title: [295401] trunk/Tools/Scripts/libraries/webkitcorepy








Revision 295401
Author jbed...@apple.com
Date 2022-06-08 16:50:03 -0700 (Wed, 08 Jun 2022)


Log Message
Bump webkitcorepy version

Unreviewed package management.

* Tools/Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.

Modified Paths

trunk/Tools/Scripts/libraries/webkitcorepy/setup.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py




Diff

Modified: trunk/Tools/Scripts/libraries/webkitcorepy/setup.py (295400 => 295401)

--- trunk/Tools/Scripts/libraries/webkitcorepy/setup.py	2022-06-08 23:26:55 UTC (rev 295400)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/setup.py	2022-06-08 23:50:03 UTC (rev 295401)
@@ -30,7 +30,7 @@
 
 setup(
 name='webkitcorepy',
-version='0.13.7',
+version='0.13.8',
 description='Library containing various Python support classes and functions.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py (295400 => 295401)

--- trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py	2022-06-08 23:26:55 UTC (rev 295400)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py	2022-06-08 23:50:03 UTC (rev 295401)
@@ -44,7 +44,7 @@
 from webkitcorepy.editor import Editor
 from webkitcorepy.file_lock import FileLock
 
-version = Version(0, 13, 7)
+version = Version(0, 13, 8)
 
 from webkitcorepy.autoinstall import Package, AutoInstall
 if sys.version_info > (3, 0):






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [295348] trunk/.github/CODEOWNERS

2022-06-07 Thread jbedard
Title: [295348] trunk/.github/CODEOWNERS








Revision 295348
Author jbed...@apple.com
Date 2022-06-07 08:40:54 -0700 (Tue, 07 Jun 2022)


Log Message
Add CODEOWNERS file
https://bugs.webkit.org/show_bug.cgi?id=241354


Reviewed by Yusuke Suzuki.

Note that we're using the CODEOWNERS file to recommend reviewers. Individual
contributors in WebKit do not "own" components.

* .github/CODEOWNERS: Added.

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

Added Paths

trunk/.github/CODEOWNERS




Diff

Added: trunk/.github/CODEOWNERS (0 => 295348)

--- trunk/.github/CODEOWNERS	(rev 0)
+++ trunk/.github/CODEOWNERS	2022-06-07 15:40:54 UTC (rev 295348)
@@ -0,0 +1,39 @@
+# Copyright (C) 2022 Apple Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1.  Redistributions of source code must retain the above copyright
+#notice, this list of conditions and the following disclaimer.
+# 2.  Redistributions in binary form must reproduce the above copyright
+#notice, this list of conditions and the following disclaimer in the
+#documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# 
+#
+# Contributors do not "own" WebKit components. This file is used to
+# automatically add reviewers to pull requests.
+#
+# 
+
+/.github @JonWBedard
+/metadata @JonWBedard
+
+# 
+/Tools @JonWBedard
+
+/Tools/CISupport @aj062 @JonWBedard @ryanhaddad
+
+/Tools/Scripts/libraries @JonWBedard
+/Tools/Scripts/libraries/webkitscmpy @facetothefate @JonWBedard






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [295288] trunk/Tools/Scripts

2022-06-06 Thread jbedard
Title: [295288] trunk/Tools/Scripts








Revision 295288
Author jbed...@apple.com
Date 2022-06-06 08:53:17 -0700 (Mon, 06 Jun 2022)


Log Message
`git webkit setup` hard codes the path to Xcode in .git/hooks/pre-commit
https://bugs.webkit.org/show_bug.cgi?id=241284


Reviewed by Tim Horton.

* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/hooks/prepare-commit-msg:
* Tools/Scripts/hooks/pre-commit: Use `git` instead of git path.
* Tools/Scripts/hooks/prepare-commit-msg: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py:
(Setup.git): Remove `git` executable path.

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

Modified Paths

trunk/Tools/Scripts/hooks/pre-commit
trunk/Tools/Scripts/hooks/prepare-commit-msg
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/hooks/prepare-commit-msg




Diff

Modified: trunk/Tools/Scripts/hooks/pre-commit (295287 => 295288)

--- trunk/Tools/Scripts/hooks/pre-commit	2022-06-06 15:22:21 UTC (rev 295287)
+++ trunk/Tools/Scripts/hooks/pre-commit	2022-06-06 15:53:17 UTC (rev 295288)
@@ -12,7 +12,7 @@
 try:
 lines = []
 for line in subprocess.check_output(
-['{{ git }}', 'diff', '--name-only'] + (['--staged'] if staged else []),
+['git', 'diff', '--name-only'] + (['--staged'] if staged else []),
 encoding='utf-8',
 ).splitlines():
 if line:
@@ -33,6 +33,6 @@
 if project_files:
 code = subprocess.run([os.path.join(SCRIPTS, 'sort-Xcode-project-file')] + project_files).returncode
 if staged:
-code += subprocess.run(['{{ git }}', 'add'] + project_files).returncode
+code += subprocess.run(['git', 'add'] + project_files).returncode
 sys.exit(code)
 sys.exit(0)


Modified: trunk/Tools/Scripts/hooks/prepare-commit-msg (295287 => 295288)

--- trunk/Tools/Scripts/hooks/prepare-commit-msg	2022-06-06 15:22:21 UTC (rev 295287)
+++ trunk/Tools/Scripts/hooks/prepare-commit-msg	2022-06-06 15:53:17 UTC (rev 295288)
@@ -13,7 +13,7 @@
 
 def message_from_staged_changelogs():
 try:
-diff = subprocess.check_output(['{{ git }}', 'diff', '--staged'])
+diff = subprocess.check_output(['git', 'diff', '--staged'])
 except subprocess.CalledProcessError:
 return ''
 
@@ -84,7 +84,7 @@
 with open(file_name, 'w') as commit_message_file:
 if sha:
 commit_message_file.write(subprocess.check_output(
-['{{ git }}', 'log', 'HEAD', '-1', '--pretty=format:%B'],
+['git', 'log', 'HEAD', '-1', '--pretty=format:%B'],
 **(dict(encoding='utf-8') if sys.version_info > (3, 5) else dict())
 ))
 else:
@@ -100,7 +100,7 @@
 commit_message_file.write('# {}\n'.format(line))
 commit_message_file.write('\n')
 for line in subprocess.check_output(
-['{{ git }}', 'status'],
+['git', 'status'],
 **(dict(encoding='utf-8') if sys.version_info > (3, 5) else dict())
 ).splitlines():
 commit_message_file.write('# {}\n'.format(line))


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (295287 => 295288)

--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-06-06 15:22:21 UTC (rev 295287)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-06-06 15:53:17 UTC (rev 295288)
@@ -29,7 +29,7 @@
 
 setup(
 name='webkitscmpy',
-version='4.15.2',
+version='4.15.3',
 description='Library designed to interact with git and svn repositories.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (295287 => 295288)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-06-06 15:22:21 UTC (rev 295287)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-06-06 15:53:17 UTC (rev 295288)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(4, 15, 2)
+version = Version(4, 15, 3)
 
 AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
 AutoInstall.register(Package('jinja2', Version(2, 11, 3)))


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py (295287 => 295288)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py	2022-06-06 15:22:21 UTC (rev 295287)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py	2022-06-06 15:53:17 UTC (rev 295288)
@@ -279,7 +279,6 @@
 with open(source_path, 'r') as f:
 from jinja2 import Template

[webkit-changes] [295102] trunk/Source/bmalloc/libpas/Documentation.md

2022-06-01 Thread jbedard
Title: [295102] trunk/Source/bmalloc/libpas/Documentation.md








Revision 295102
Author jbed...@apple.com
Date 2022-06-01 13:15:53 -0700 (Wed, 01 Jun 2022)


Log Message
[libpas] add documentation (Follow-up)
https://bugs.webkit.org/show_bug.cgi?id=236385


Reviewed by Mark Lam.

* Source/bmalloc/libpas/Documentation.md: Convert hashes and revisions to identifiers.

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

Modified Paths

trunk/Source/bmalloc/libpas/Documentation.md




Diff

Modified: trunk/Source/bmalloc/libpas/Documentation.md (295101 => 295102)

--- trunk/Source/bmalloc/libpas/Documentation.md	2022-06-01 20:15:16 UTC (rev 295101)
+++ trunk/Source/bmalloc/libpas/Documentation.md	2022-06-01 20:15:53 UTC (rev 295102)
@@ -30,18 +30,18 @@
 
 # Introduction
 
-This document describes how libpas works as of a361efa96ca4b2ff6bdfc28bc7eb1a678cde75be, so a bit ahead of
-where WebKit was as of r289146. Libpas is a fast and memory-efficient memory allocation toolkit capable of
-supporting many heaps at once, engineered with the hopes that someday it'll be used for comprehensive isoheaping
-of all malloc/new callsites in C/C++ programs.
+This document describes how libpas works as of [247029@main](https://commits.webkit.org/247029@main), so a bit ahead of
+where WebKit was as of [246842@main](https://commits.webkit.org/246842@main). Libpas is a fast and memory-efficient
+memory allocation toolkit capable of supporting many heaps at once, engineered with the hopes that someday it'll be used
+for comprehensive isoheaping of all malloc/new callsites in C/C++ programs.
 
-Since WebKit r213753, we've been steadily enabling libpas as a replacement for WebKit's bmalloc and
-MetaAllocator. This has so far added up to a ~2% Speedometer2 speed-up and a ~8% memory improvement (on multiple
-memory benchmarks). Half of the speed-up comes from replacing the MetaAllocator, which was _javascript_Core's old
-way of managing executable memory. Now, JSC uses libpas's jit_heap to manage executable memory. The other half
-of the speed-up comes from replacing everything that bmalloc provided -- the fastMalloc API, the Gigacage API,
-and the IsoHeap<> API. All of the memory improvement comes from replacing bmalloc (the MetaAllocator was already
-fairly memory-efficient).
+Since WebKit [186504@main](https://commits.webkit.org/186504@main), we've been steadily enabling libpas as a
+replacement for WebKit's bmalloc and MetaAllocator. This has so far added up to a ~2% Speedometer2 speed-up and
+a ~8% memory improvement (on multiple memory benchmarks). Half of the speed-up comes from replacing the MetaAllocator,
+which was _javascript_Core's old way of managing executable memory. Now, JSC uses libpas's jit_heap to manage executable
+memory. The other half of the speed-up comes from replacing everything that bmalloc provided -- the fastMalloc API, the
+Gigacage API, and the IsoHeap<> API. All of the memory improvement comes from replacing bmalloc (the MetaAllocator was
+already fairly memory-efficient).
 
 This document is structured as follows. First I describe the goals of libpas; these are the things that a
 malloc-like API created out of libpas should be able to expose as fast and memory-efficient functions. Then I
@@ -427,7 +427,7 @@
 daemons). But when used for many heaps, these overheads are substantial. Given thousands or tens of thousands
 of heaps, TLCs account for as much as 1% of memory. So, TLCs support partial decommit. Those pages that only
 have allocators that are inactive get decommitted. Note that TLC decommit has landed in the libpas.git repo
-as of a361efa96ca4b2ff6bdfc28bc7eb1a678cde75be, but hasn't yet been merged into WebKit.
+as of [247029@main](https://commits.webkit.org/247029@main), but hasn't yet been merged into WebKit.
 
 The TLC deallocation log flush algorithm is designed to achieve two performance optimizations:
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [295096] trunk/Tools/Scripts/libraries/webkitscmpy

2022-06-01 Thread jbedard
Title: [295096] trunk/Tools/Scripts/libraries/webkitscmpy








Revision 295096
Author jbed...@apple.com
Date 2022-06-01 10:41:12 -0700 (Wed, 01 Jun 2022)


Log Message
[git-webkit] Append -- to `git log` commands
https://bugs.webkit.org/show_bug.cgi?id=241161


Reviewed by Alexey Proskuryakov.

* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git.Cache.populate): Append -- to `git log` command.
(Git.commit): Ditto.
(Git.commits): Ditto.
(Git.checkout): Append -- to `git checkout` command.

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

Modified Paths

trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py




Diff

Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (295095 => 295096)

--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-06-01 17:32:05 UTC (rev 295095)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-06-01 17:41:12 UTC (rev 295096)
@@ -29,7 +29,7 @@
 
 setup(
 name='webkitscmpy',
-version='4.15.1',
+version='4.15.2',
 description='Library designed to interact with git and svn repositories.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (295095 => 295096)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-06-01 17:32:05 UTC (rev 295095)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-06-01 17:41:12 UTC (rev 295096)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(4, 15, 1)
+version = Version(4, 15, 2)
 
 AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
 AutoInstall.register(Package('jinja2', Version(2, 11, 3)))


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py (295095 => 295096)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py	2022-06-01 17:32:05 UTC (rev 295095)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py	2022-06-01 17:41:12 UTC (rev 295096)
@@ -129,7 +129,7 @@
 kwargs = dict(encoding='utf-8')
 self._last_populated[branch] = time.time()
 log = subprocess.Popen(
-[self.repo.executable(), 'log', branch, '--no-decorate', '--date=unix'],
+[self.repo.executable(), 'log', branch, '--no-decorate', '--date=unix', '--'],
 cwd=self.repo.root_path,
 stdout=subprocess.PIPE,
 stderr=subprocess.PIPE,
@@ -592,7 +592,7 @@
 # If the cache managed to convert the identifier to a hash, we can skip some computation
 if hash:
 log = run(
-[self.executable(), 'log', hash] + log_format,
+[self.executable(), 'log', hash] + log_format + ['--'],
 cwd=self.root_path,
 capture_output=True,
 encoding='utf-8',
@@ -615,7 +615,7 @@
 if identifier > base_count:
 raise self.Exception('Identifier {} cannot be found on the specified branch in the current checkout'.format(identifier))
 log = run(
-[self.executable(), 'log', '{}~{}'.format(branch or 'HEAD', base_count - identifier)] + log_format,
+[self.executable(), 'log', '{}~{}'.format(branch or 'HEAD', base_count - identifier)] + log_format + ['--'],
 cwd=self.root_path,
 capture_output=True,
 encoding='utf-8',
@@ -636,7 +636,7 @@
 if branch and tag:
 raise ValueError('Cannot define both tag and branch')
 
-log = run([self.executable(), 'log', branch or tag] + log_format, cwd=self.root_path, capture_output=True, encoding='utf-8')
+log = run([self.executable(), 'log', branch or tag] + log_format + ['--'], cwd=self.root_path, capture_output=True, encoding='utf-8')
 if log.returncode:
 raise self.Exception("Failed to retrieve commit information for '{}'".format(branch or tag))
 
@@ -643,7 +643,7 @@
 # Determine the `git log` output for a given hash
 else:
 hash = Commit._parse_hash(hash, do_assert=True)
-log = run([self.executable(), 'log', hash or 'HEAD'] + log_format, cwd=self.root_path, capture_output=True, encoding='utf-8')
+log = run([self.executable(), 'log', hash or 'HEAD'] + log_format + ['--'], cwd=self.root_path, capture_output=True, encoding='utf-8')
 if log.returncode:
 raise self.Exception("Failed to retrieve commit information for 

[webkit-changes] [294893] trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy

2022-05-26 Thread jbedard
Title: [294893] trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy








Revision 294893
Author jbed...@apple.com
Date 2022-05-26 13:18:36 -0700 (Thu, 26 May 2022)


Log Message
[git-webkit] Support radar when auto-filing bug
https://bugs.webkit.org/show_bug.cgi?id=240969


Reviewed by Dewei Zhu.

* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py:
(Branch.main): Handle case where tracker does not have defined credentials.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/branch_unittest.py:
(TestBranch.test_create_bug): Added.

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

Modified Paths

trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/branch_unittest.py




Diff

Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py (294892 => 294893)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py	2022-05-26 20:06:56 UTC (rev 294892)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py	2022-05-26 20:18:36 UTC (rev 294893)
@@ -118,7 +118,7 @@
 
 if not issue and Tracker.instance():
 if ' ' in args.issue:
-if getattr(Tracker.instance(), 'credentials'):
+if getattr(Tracker.instance(), 'credentials', None):
 Tracker.instance().credentials(required=True, validate=True)
 issue = Tracker.instance().create(
 title=args.issue,


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/branch_unittest.py (294892 => 294893)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/branch_unittest.py	2022-05-26 20:06:56 UTC (rev 294892)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/branch_unittest.py	2022-05-26 20:18:36 UTC (rev 294893)
@@ -125,8 +125,7 @@
 self.assertEqual(captured.stderr.getvalue(), "'eng/reject_underscores' is an invalid branch name, cannot create it\n")
 
 def test_create_bug(self):
-self.maxDiff = None
-with MockTerminal.input('2'), OutputCapture(level=logging.INFO) as captured, mocks.local.Git(self.path), bmocks.Bugzilla(
+with OutputCapture(level=logging.INFO) as captured, mocks.local.Git(self.path), bmocks.Bugzilla(
 self.BUGZILLA.split('://')[-1],
 issues=bmocks.ISSUES,
 projects=bmocks.PROJECTS,
@@ -177,6 +176,49 @@
 )
 self.assertEqual(captured.stderr.getvalue(), '')
 
+def test_create_radar(self):
+with OutputCapture(level=logging.INFO) as captured, mocks.local.Git(self.path), Environment(RADAR_USERNAME='tcontributor'), bmocks.Radar(
+issues=bmocks.ISSUES,
+projects=bmocks.PROJECTS,
+), patch('webkitbugspy.Tracker._trackers', [radar.Tracker(project='WebKit')]), mocks.local.Svn(), MockTime, wkmocks.Terminal.input(
+'[Area] New Issue', 'Issue created via command line prompts.',
+'1', '2',
+):
+self.assertEqual(0, program.main(
+args=('branch',),
+path=self.path,
+))
+self.assertEqual(local.Git(self.path).branch, 'eng/Area-New-Issue')
+
+issue = radar.Tracker(project='WebKit').issue(4)
+self.assertEqual(issue.title, '[Area] New Issue')
+self.assertEqual(issue.description, 'Issue created via command line prompts.')
+self.assertEqual(issue.project, 'WebKit')
+self.assertEqual(issue.component, 'SVG')
+self.assertEqual(issue.version, 'Safari 15')
+
+self.assertEqual(
+captured.stdout.getvalue(),
+'''Enter issue URL or title of new issue: 
+Issue description: 
+What component in 'WebKit' should the bug be associated with?:
+1) SVG
+2) Scrolling
+3) Tables
+4) Text
+: 
+What version of 'WebKit SVG' should the bug be associated with?:
+1) Other
+2) Safari 15
+3) Safari Technology Preview
+4) WebKit Local Build
+: 
+Created ' [Area] New Issue'
+Created the local development branch 'eng/Area-New-Issue'
+''',
+)
+self.assertEqual(captured.stderr.getvalue(), '')
+
 def test_to_branch_name(self):
 self.assertEqual(program.Branch.to_branch_name('something with spaces'), 'something-with-spaces')
 self.assertEqual(program.Branch.to_branch_name('[EWS] bug description'), 'EWS-bug-description')






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [294869] trunk/Tools/Scripts/libraries/reporelaypy

2022-05-25 Thread jbedard
Title: [294869] trunk/Tools/Scripts/libraries/reporelaypy








Revision 294869
Author jbed...@apple.com
Date 2022-05-25 22:21:11 -0700 (Wed, 25 May 2022)


Log Message
[commits.webkit.org] Support compare redirect
https://bugs.webkit.org/show_bug.cgi?id=240908


Reviewed by Dewei Zhu.

* Tools/Scripts/libraries/reporelaypy/reporelaypy/__init__.py: Bump version.
* Tools/Scripts/libraries/reporelaypy/setup.py: Ditto.
* Tools/Scripts/libraries/reporelaypy/reporelaypy/checkoutroute.py:
(Redirector):
(Redirector.bitbucket_compare): Added.
(Redirector.trac_compare): Added.
(Redirector.github_compare): Added.
(Redirector.__init__): Define a compare function.
(CheckoutRoute):
(CheckoutRoute.find_newer): Add function to sort a commit pair.
(CheckoutRoute.__init__): Add 'compare' endpoints.
* Tools/Scripts/libraries/reporelaypy/reporelaypy/tests/checkoutroute_unittest.py:
(CheckoutRouteUnittest.test_compare):
(CheckoutRouteUnittest.test_compare_trac):

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

Modified Paths

trunk/Tools/Scripts/libraries/reporelaypy/reporelaypy/__init__.py
trunk/Tools/Scripts/libraries/reporelaypy/reporelaypy/checkoutroute.py
trunk/Tools/Scripts/libraries/reporelaypy/reporelaypy/tests/checkoutroute_unittest.py
trunk/Tools/Scripts/libraries/reporelaypy/setup.py




Diff

Modified: trunk/Tools/Scripts/libraries/reporelaypy/reporelaypy/__init__.py (294868 => 294869)

--- trunk/Tools/Scripts/libraries/reporelaypy/reporelaypy/__init__.py	2022-05-26 04:09:03 UTC (rev 294868)
+++ trunk/Tools/Scripts/libraries/reporelaypy/reporelaypy/__init__.py	2022-05-26 05:21:11 UTC (rev 294869)
@@ -44,7 +44,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(0, 6, 0)
+version = Version(0, 7, 0)
 
 import webkitflaskpy
 


Modified: trunk/Tools/Scripts/libraries/reporelaypy/reporelaypy/checkoutroute.py (294868 => 294869)

--- trunk/Tools/Scripts/libraries/reporelaypy/reporelaypy/checkoutroute.py	2022-05-26 04:09:03 UTC (rev 294868)
+++ trunk/Tools/Scripts/libraries/reporelaypy/reporelaypy/checkoutroute.py	2022-05-26 05:21:11 UTC (rev 294869)
@@ -1,4 +1,4 @@
-# Copyright (C) 2021 Apple Inc. All rights reserved.
+# Copyright (C) 2021-2022 Apple Inc. All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
@@ -54,6 +54,15 @@
 return redirector
 
 @classmethod
+def bitbucket_compare(cls, url):
+def redirector(head, base):
+if head and head.hash and base and base.hash:
+return redirect('{}/compare/diff?targetBranch={}={}'.format(url, base.hash, head.hash))
+return redirect('{}/compare'.format(url))
+
+return redirector
+
+@classmethod
 def trac_generator(cls, base):
 def redirector(commit):
 if commit and commit.revision:
@@ -63,6 +72,15 @@
 return redirector
 
 @classmethod
+def trac_compare(cls, url):
+def redirector(head, base):
+if head and head.revision and base and base.revision:
+return redirect('{}/log/webkit/trunk?verbose=on={}_rev={}'.format(url, head.revision, base.revision))
+return redirect('{}/log/webkit/trunk'.format(url))
+
+return redirector
+
+@classmethod
 def github_generator(cls, base):
 def redirector(commit):
 if commit and commit.hash:
@@ -72,6 +90,15 @@
 return redirector
 
 @classmethod
+def github_compare(cls, url):
+def redirector(head, base):
+if head and head.hash and base and base.hash:
+return redirect('{}/compare/{}...{}'.format(url, base.hash, head.hash))
+return redirect('{}/compare'.format(url))
+
+return redirector
+
+@classmethod
 def from_json(cls, data):
 data = "" if isinstance(data, dict) else json.loads(data)
 if isinstance(data, list):
@@ -84,14 +111,15 @@
 self._redirect = None
 
 for key, params in dict(
-bitbucket=(remote.BitBucket.URL_RE, self.bitbucket_generator),
-trac=(re.compile(r'\Ahttps?://trac.(?P\S+)\Z'), self.trac_generator),
-github=(remote.GitHub.URL_RE, self.github_generator),
+bitbucket=(remote.BitBucket.URL_RE, self.bitbucket_generator, self.bitbucket_compare),
+trac=(re.compile(r'\Ahttps?://trac.(?P\S+)\Z'), self.trac_generator, self.trac_compare),
+github=(remote.GitHub.URL_RE, self.github_generator, self.github_compare),
 ).items():
-regex, generator = params
+regex, generator, compare = params
 if regex.match(url):
 self.type = key
 self._redirect = generator(url)
+self.compare = compare(url)
 break
 if not self.type:
 raise TypeError("'{}' is not a recognized 

[webkit-changes] [294748] trunk/Tools/Scripts/hooks/pre-commit

2022-05-24 Thread jbedard
Title: [294748] trunk/Tools/Scripts/hooks/pre-commit








Revision 294748
Author jbed...@apple.com
Date 2022-05-24 08:38:44 -0700 (Tue, 24 May 2022)


Log Message
[GitHub] git-webkit pr doesn't sort Xcode project files before uploading
https://bugs.webkit.org/show_bug.cgi?id=239975


Reviewed by Chris Dumez.

* Tools/Scripts/hooks/pre-commit: Sort Xcode project files on commit.

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

Added Paths

trunk/Tools/Scripts/hooks/pre-commit




Diff

Added: trunk/Tools/Scripts/hooks/pre-commit (0 => 294748)

--- trunk/Tools/Scripts/hooks/pre-commit	(rev 0)
+++ trunk/Tools/Scripts/hooks/pre-commit	2022-05-24 15:38:44 UTC (rev 294748)
@@ -0,0 +1,38 @@
+#!/usr/bin/env {{ python }}
+
+import os
+import subprocess
+import sys
+
+LOCATION = '{{ location }}'
+SCRIPTS = os.path.dirname(os.path.dirname(LOCATION))
+
+
+def files(staged=True):
+try:
+lines = []
+for line in subprocess.check_output(
+['{{ git }}', 'diff', '--name-only'] + (['--staged'] if staged else []),
+encoding='utf-8',
+).splitlines():
+if line:
+lines.append(line)
+return lines
+except subprocess.CalledProcessError:
+return []
+
+
+staged = files(staged=True)
+unstaged = files(staged=False)
+
+project_files = []
+for line in staged or unstaged:
+if line.endswith('pbxproj'):
+project_files.append(line)
+
+if project_files:
+code = subprocess.run([os.path.join(SCRIPTS, 'sort-Xcode-project-file')] + project_files).returncode
+if staged:
+code += subprocess.run(['{{ git }}', 'add'] + project_files).returncode
+sys.exit(code)
+sys.exit(0)






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [294661] trunk/Tools/Scripts/libraries

2022-05-23 Thread jbedard
Title: [294661] trunk/Tools/Scripts/libraries








Revision 294661
Author jbed...@apple.com
Date 2022-05-23 11:53:25 -0700 (Mon, 23 May 2022)


Log Message
git webkit setup opens a GitHub web page without warning
https://bugs.webkit.org/show_bug.cgi?id=240490


Reviewed by Alexey Proskuryakov.

* Tools/Scripts/libraries/webkitbugspy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/github.py:
(Tracker.credentials.prompt): Prompt user before generating token.
* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/terminal.py:
(Terminal.open_url): Allow caller to specify a prompt before opening URL.

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

Modified Paths

trunk/Tools/Scripts/libraries/webkitbugspy/setup.py
trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py
trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/github.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/terminal.py
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py




Diff

Modified: trunk/Tools/Scripts/libraries/webkitbugspy/setup.py (294660 => 294661)

--- trunk/Tools/Scripts/libraries/webkitbugspy/setup.py	2022-05-23 18:50:02 UTC (rev 294660)
+++ trunk/Tools/Scripts/libraries/webkitbugspy/setup.py	2022-05-23 18:53:25 UTC (rev 294661)
@@ -30,7 +30,7 @@
 
 setup(
 name='webkitbugspy',
-version='0.6.0',
+version='0.6.1',
 description='Library containing a shared API for various bug trackers.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py (294660 => 294661)

--- trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py	2022-05-23 18:50:02 UTC (rev 294660)
+++ trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py	2022-05-23 18:53:25 UTC (rev 294661)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(0, 6, 0)
+version = Version(0, 6, 1)
 
 from .user import User
 from .issue import Issue


Modified: trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/github.py (294660 => 294661)

--- trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/github.py	2022-05-23 18:50:02 UTC (rev 294660)
+++ trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/github.py	2022-05-23 18:53:25 UTC (rev 294661)
@@ -113,7 +113,11 @@
 
 def prompt():
 result = "GitHub's API\nProvide {} username and access token to create and update pull requests".format(hostname)
-if webkitcorepy.Terminal.open_url('{}?scopes=repo,workflow={}%20Local%20Automation'.format(token_url, self.name)):
+if webkitcorepy.Terminal.open_url(
+'{}?scopes=repo,workflow={}%20Local%20Automation'.format(token_url, self.name),
+prompt='Please press Return key to open the GitHub token generation web page.\n'
+'Options are preconfigured, set your expiration date and then click "Generate token": ',
+):
 return result
 return '''{}
 Please go to {token_url} and generate a new 'Personal access token' via 'Developer settings'


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/terminal.py (294660 => 294661)

--- trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/terminal.py	2022-05-23 18:50:02 UTC (rev 294660)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/terminal.py	2022-05-23 18:53:25 UTC (rev 294661)
@@ -121,7 +121,7 @@
 cls._atty_overrides[key] = previous
 
 @classmethod
-def open_url(cls, url):
+def open_url(cls, url, prompt=None):
 if all(not url.startswith(prefix) for prefix in cls.URL_PREFIXES):
 sys.stderr.write("'{}' is not a valid URL\n")
 return False
@@ -128,6 +128,13 @@
 if not cls.isatty(sys.stdout):
 return False
 
+if prompt:
+try:
+cls.input(prompt)
+except SystemExit:
+sys.stderr.write('User aborted URL open\n')
+return False
+
 if sys.platform.startswith('win'):
 process = run(['explorer', url])
 else:


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (294660 => 294661)

--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-05-23 18:50:02 UTC (rev 294660)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-05-23 18:53:25 UTC (rev 294661)
@@ -29,7 +29,7 @@
 
 setup(
 name='webkitscmpy',
-version='4.14.4',
+version='4.14.5',
 description='Library designed to interact with git and svn repositories.',
 long_description=readme(),
 classifiers=[



[webkit-changes] [294582] trunk/Tools/CISupport/ews-build

2022-05-20 Thread jbedard
Title: [294582] trunk/Tools/CISupport/ews-build








Revision 294582
Author jbed...@apple.com
Date 2022-05-20 14:42:03 -0700 (Fri, 20 May 2022)


Log Message
[Merge-Queue] Validate reviewers in commit message
https://bugs.webkit.org/show_bug.cgi?id=240718


Reviewed by Aakash Jain.

* Tools/CISupport/ews-build/steps.py:
(ValidateCommitMessage):
(ValidateCommitMessage.__init__):
(ValidateCommitMessage.extract_reviewers): Extract reviewers from commit message.
(ValidateCommitMessage.is_reviewer): Check if a contributor is a reviewer.
(ValidateCommitMessage.run): Check if extracted reviewers are reviewers.
* Tools/CISupport/ews-build/steps_unittest.py:

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

Modified Paths

trunk/Tools/CISupport/ews-build/steps.py
trunk/Tools/CISupport/ews-build/steps_unittest.py




Diff

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

--- trunk/Tools/CISupport/ews-build/steps.py	2022-05-20 21:41:14 UTC (rev 294581)
+++ trunk/Tools/CISupport/ews-build/steps.py	2022-05-20 21:42:03 UTC (rev 294582)
@@ -479,6 +479,7 @@
 if name and emails:
 bugzilla_email = emails[0].lower()  # We're requiring that the first email is the primary bugzilla email
 cls.contributors[bugzilla_email] = {'name': name, 'status': value.get('status')}
+cls.contributors[name] = {'status': value.get('status')}
 if github_username and name and emails:
 cls.contributors[github_username.lower()] = dict(
 name=name,
@@ -4871,7 +4872,7 @@
 return not self.doStepIf(step)
 
 
-class ValidateCommitMessage(steps.ShellSequence, ShellMixin):
+class ValidateCommitMessage(steps.ShellSequence, ShellMixin, AddToLogMixin):
 name = 'validate-commit-message'
 haltOnFailure = False
 flunkOnFailure = True
@@ -4878,15 +4879,36 @@
 OOPS_RE = 'OO*PP*S!'
 REVIEWED_STRINGS = (
 'Reviewed by',
-'Unreviewed',
 'Rubber-stamped by',
 'Rubber stamped by',
+'Unreviewed',
 )
 RE_CHANGELOG = br'^(\+\+\+)\s+(.*ChangeLog.*)'
+BY_RE = re.compile(r'.+\s+by\s+(.+)$')
+SPLIT_RE = re.compile(r'(,\s*)|( and )|\.')
 
 def __init__(self, **kwargs):
 super(ValidateCommitMessage, self).__init__(logEnviron=False, timeout=60, **kwargs)
+self.contributors = {}
 
+@classmethod
+def extract_reviewers(cls, text):
+reviewers = set()
+stripped_text = ''
+for line in text.splitlines():
+match = cls.BY_RE.match(line)
+if not match:
+stripped_text += line + '\n'
+continue
+for person in cls.SPLIT_RE.split(match.group(1)):
+if person and not cls.SPLIT_RE.match(person):
+reviewers.add(person)
+return reviewers, stripped_text
+
+def is_reviewer(self, name):
+contributor = self.contributors.get(name)
+return contributor and contributor['status'] == 'reviewer'
+
 def _files(self):
 sourcestamp = self.build.getSourceStamp(self.getProperty('codebase', ''))
 if sourcestamp and sourcestamp.changes:
@@ -4911,6 +4933,9 @@
 "git log {} ^{} | grep -q '\\({}\\)' || echo 'No reviewer information in commit message'".format(
 head_ref, base_ref,
 '\\|'.join(self.REVIEWED_STRINGS),
+), "git log {} ^{} | grep '\\({}\\)'".format(
+head_ref, base_ref,
+'\\|'.join(self.REVIEWED_STRINGS[:-1]),
 ),
 ]
 for command in commands:
@@ -4925,7 +4950,15 @@
 self.summary = 'Patches have no commit message'
 return rc
 
-log_text = self.log_observer.getStdout().rstrip()
+self.contributors, errors = Contributors.load(use_network=True)
+for error in errors:
+print(error)
+self._addToLog('stdio', error)
+
+reviewers, log_text = self.extract_reviewers(self.log_observer.getStdout())
+log_text = log_text.rstrip()
+author = self.getProperty('author', '')
+
 if any(['ChangeLog' in file for file in self._files()]):
 self.summary = 'ChangeLog modified, WebKit only allows commit messages'
 rc = FAILURE
@@ -4933,7 +4966,21 @@
 self.summary = log_text
 rc = FAILURE
 elif rc == SUCCESS:
-self.summary = 'Validated commit message'
+if reviewers and not self.contributors:
+self.summary = "Failed to load contributors.json, can't validate reviewers"
+rc = FAILURE
+elif reviewers and any([not self.is_reviewer(reviewer) for reviewer in reviewers]):
+self.summary = "'{}' is not a reviewer"
+for reviewer in reviewers:
+if not self.is_reviewer(reviewer):
+self.summary = 

[webkit-changes] [294545] trunk/Tools/CISupport/ews-build

2022-05-20 Thread jbedard
Title: [294545] trunk/Tools/CISupport/ews-build








Revision 294545
Author jbed...@apple.com
Date 2022-05-20 08:55:23 -0700 (Fri, 20 May 2022)


Log Message
[EWS] Remove ChangeLog steps
https://bugs.webkit.org/show_bug.cgi?id=240542


Reviewed by Aakash Jain.

* Tools/CISupport/ews-build/factories.py:
* Tools/CISupport/ews-build/steps.py:
(ValidateCommitterAndReviewer.start):
(SetBuildSummary.start):
(ValidateChangeLogAndReviewer): Deleted.
(FindModifiedChangeLogs): Deleted.
(CreateLocalGITCommit): Deleted.
* Tools/CISupport/ews-build/steps_unittest.py:

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

Modified Paths

trunk/Tools/CISupport/ews-build/factories.py
trunk/Tools/CISupport/ews-build/steps.py
trunk/Tools/CISupport/ews-build/steps_unittest.py




Diff

Modified: trunk/Tools/CISupport/ews-build/factories.py (294544 => 294545)

--- trunk/Tools/CISupport/ews-build/factories.py	2022-05-20 15:28:50 UTC (rev 294544)
+++ trunk/Tools/CISupport/ews-build/factories.py	2022-05-20 15:55:23 UTC (rev 294545)
@@ -26,14 +26,14 @@
 
 from steps import (AddAuthorToCommitMessage, AddReviewerToCommitMessage, ApplyPatch, ApplyWatchList, Canonicalize, CommitPatch,
CheckOutPullRequest, CheckOutSource, CheckOutSpecificRevision, CheckChangeRelevance,
-   CheckPatchStatusOnEWSQueues, CheckStyle, CleanGitRepo, CompileJSC, CompileWebKit, ConfigureBuild, CreateLocalGITCommit,
-   DetermineAuthor, DownloadBuiltProduct, ExtractBuiltProduct, FetchBranches, FindModifiedChangeLogs, FindModifiedLayoutTests, GitSvnFetch,
+   CheckPatchStatusOnEWSQueues, CheckStyle, CleanGitRepo, CompileJSC, CompileWebKit, ConfigureBuild,
+   DetermineAuthor, DownloadBuiltProduct, ExtractBuiltProduct, FetchBranches, FindModifiedLayoutTests, GitSvnFetch,
InstallGtkDependencies, InstallWpeDependencies, KillOldProcesses, PrintConfiguration, PushCommitToWebKitRepo,
RunAPITests, RunBindingsTests, RunBuildWebKitOrgUnitTests, RunBuildbotCheckConfigForBuildWebKit, RunBuildbotCheckConfigForEWS,
RunEWSUnitTests, RunResultsdbpyTests, RunJavaScriptCoreTests, RunWebKit1Tests, RunWebKitPerlTests, RunWebKitPyPython2Tests,
RunWebKitPyPython3Tests, RunWebKitTests, RunWebKitTestsRedTree, RunWebKitTestsInStressMode, RunWebKitTestsInStressGuardmallocMode,
SetBuildSummary, ShowIdentifier, TriggerCrashLogSubmission, UpdateWorkingDirectory,
-   ValidateCommitMessage, ValidateChange, ValidateChangeLogAndReviewer, ValidateCommitterAndReviewer, WaitForCrashCollection,
+   ValidateCommitMessage, ValidateChange, ValidateCommitterAndReviewer, WaitForCrashCollection,
InstallBuiltProduct, VerifyGitHubIntegrity, ValidateSquashed)
 
 


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

--- trunk/Tools/CISupport/ews-build/steps.py	2022-05-20 15:28:50 UTC (rev 294544)
+++ trunk/Tools/CISupport/ews-build/steps.py	2022-05-20 15:55:23 UTC (rev 294545)
@@ -1680,39 +1680,6 @@
 return None
 
 
-class ValidateChangeLogAndReviewer(shell.ShellCommand):
-name = 'validate-changelog-and-reviewer'
-descriptionDone = ['Validated ChangeLog and Reviewer']
-command = ['python3', 'Tools/Scripts/webkit-patch', 'validate-changelog', '--check-oops', '--non-interactive']
-haltOnFailure = False
-flunkOnFailure = True
-
-def __init__(self, **kwargs):
-shell.ShellCommand.__init__(self, timeout=3 * 60, logEnviron=False, **kwargs)
-
-def start(self):
-self.log_observer = logobserver.BufferLogObserver(wantStderr=True)
-self.addLogObserver('stdio', self.log_observer)
-return shell.ShellCommand.start(self)
-
-def getResultSummary(self):
-if self.results != SUCCESS:
-return {'step': 'ChangeLog validation failed'}
-return shell.ShellCommand.getResultSummary(self)
-
-def evaluateCommand(self, cmd):
-rc = shell.ShellCommand.evaluateCommand(self, cmd)
-if rc == FAILURE:
-log_text = self.log_observer.getStdout() + self.log_observer.getStderr()
-self.setProperty('comment_text', log_text)
-self.setProperty('build_finish_summary', 'ChangeLog validation failed')
-self.build.addStepsAfterCurrentStep([
-LeaveComment(),
-SetCommitQueueMinusFlagOnPatch(), BlockPullRequest(),
-])
-return rc
-
-
 class SetCommitQueueMinusFlagOnPatch(buildstep.BuildStep, BugzillaMixin):
 name = 'set-cq-minus-flag-on-patch'
 
@@ -4475,103 +4442,6 @@
 return defer.succeed(None)
 
 
-class FindModifiedChangeLogs(shell.ShellCommand):
-name = 'find-modified-changelogs'
-descriptionDone = ['Found modified ChangeLogs']
-command = ['git', 'diff', '-r', '--name-status', '--no-renames', '--no-ext-diff', '--full-index']
-haltOnFailure = False
-
-

[webkit-changes] [294521] trunk/Tools/Scripts/webkitpy

2022-05-19 Thread jbedard
Title: [294521] trunk/Tools/Scripts/webkitpy








Revision 294521
Author jbed...@apple.com
Date 2022-05-19 18:26:21 -0700 (Thu, 19 May 2022)


Log Message
[webkit-patch] Fix revert workflow
https://bugs.webkit.org/show_bug.cgi?id=240684


Reviewed by Dewei Zhu.

* Tools/Scripts/webkitpy/common/checkout/checkout.py:
(_changelog_data_for_revision): Use git commit message instead of ChangeLog.
(changelog_entries_for_revision): Deleted.
* Tools/Scripts/webkitpy/common/checkout/checkout_unittest.py:
(CheckoutTest.test_changelog_entries_for_revision): Deleted.
(CheckoutTest.test_commit_info_for_revision): Deleted.
(CheckoutTest.test_bug_id_for_revision): Deleted.
(CheckoutTest.test_suggested_reviewers): Deleted.
* Tools/Scripts/webkitpy/common/config/committers.py:
(Contributor.email): Match webkitscmpy's API.
* Tools/Scripts/webkitpy/tool/commands/download.py:
(AbstractRevertPrepCommand._prepare_state): Use email instead of bugzilla_email.
* Tools/Scripts/webkitpy/tool/steps/preparechangelogforrevert.py:
(PrepareChangeLogForRevert.run): Replace with a `git commit -a -m`.

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

Modified Paths

trunk/Tools/Scripts/webkitpy/common/checkout/checkout.py
trunk/Tools/Scripts/webkitpy/common/checkout/checkout_unittest.py
trunk/Tools/Scripts/webkitpy/common/config/committers.py
trunk/Tools/Scripts/webkitpy/tool/commands/download.py
trunk/Tools/Scripts/webkitpy/tool/steps/preparechangelogforrevert.py




Diff

Modified: trunk/Tools/Scripts/webkitpy/common/checkout/checkout.py (294520 => 294521)

--- trunk/Tools/Scripts/webkitpy/common/checkout/checkout.py	2022-05-20 01:22:33 UTC (rev 294520)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/checkout.py	2022-05-20 01:26:21 UTC (rev 294521)
@@ -31,9 +31,10 @@
 import sys
 
 from webkitcorepy import StringIO, string_utils
+from webkitscmpy import local
 
 from webkitpy.common.config import urls
-from webkitpy.common.checkout.changelog import ChangeLog, parse_bug_id_from_changelog
+from webkitpy.common.checkout.changelog import ChangeLog, ChangeLogEntry, parse_bug_id_from_changelog
 from webkitpy.common.checkout.commitinfo import CommitInfo
 from webkitpy.common.checkout.scm import CommitMessage
 from webkitpy.common.memoized import memoized
@@ -93,41 +94,19 @@
 changelog_file = StringIO(changelog_contents.decode("utf-8", "ignore"))
 return ChangeLog.parse_latest_entry_from_file(changelog_file)
 
-def changelog_entries_for_revision(self, revision, changed_files=None):
-if not changed_files:
-changed_files = self._scm.changed_files_for_revision(revision)
-# FIXME: This gets confused if ChangeLog files are moved, as
-# deletes are still "changed files" per changed_files_for_revision.
-# FIXME: For now we hack around this by caching any exceptions
-# which result from having deleted files included the changed_files list.
-changelog_entries = []
-for path in changed_files:
-if not self.is_path_to_changelog(path):
-continue
-try:
-changelog_entries.append(self._latest_entry_for_changelog_at_revision(path, revision))
-except ScriptError:
-pass
-return changelog_entries
+def _changelog_data_for_revision(self, revision):
+repo = local.Scm.from_path(self._scm.checkout_root)
+commit = repo.commit(revision=revision)
 
-def _changelog_data_for_revision(self, revision):
-changed_files = self._scm.changed_files_for_revision(revision)
-changelog_entries = self.changelog_entries_for_revision(revision, changed_files=changed_files)
-# Assume for now that the first entry has everything we need:
-# FIXME: This will throw an exception if there were no ChangeLogs.
-if not len(changelog_entries):
-return None
-changelog_entry = changelog_entries[0]
 return {
-"bug_id": changelog_entry.bug_id(),
-"author_name": changelog_entry.author_name(),
-"author_email": changelog_entry.author_email(),
-"author": changelog_entry.author(),
-"bug_description": changelog_entry.bug_description(),
-"reviewer_text": changelog_entry.reviewer_text(),
-"reviewer": changelog_entry.reviewer(),
-"contents": changelog_entry.contents(),
-"changed_files": changed_files,
+"bug_id": parse_bug_id_from_changelog(commit.message),
+"author_name": commit.author.name,
+"author_email": commit.author.email,
+"author": commit.author,
+"contents": commit.message,
+"reviewer": ChangeLogEntry._parse_reviewer_text(commit.message)[0],
+"bug_description": commit.message.splitlines()[0],
+"changed_files": self._scm.changed_files_for_revision(revision),
 }
 
 @memoized


Modified: 

[webkit-changes] [294501] trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/ setup.py

2022-05-19 Thread jbedard
Title: [294501] trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py








Revision 294501
Author jbed...@apple.com
Date 2022-05-19 12:53:43 -0700 (Thu, 19 May 2022)


Log Message
git webkit setup pauses between questions to install modules
https://bugs.webkit.org/show_bug.cgi?id=240487


Reviewed by Alexey Proskuryakov.

* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py:
(Setup.main): Pre-install jinja.

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

Modified Paths

trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py




Diff

Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py (294500 => 294501)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py	2022-05-19 19:53:04 UTC (rev 294500)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py	2022-05-19 19:53:43 UTC (rev 294501)
@@ -481,6 +481,8 @@
 
 @classmethod
 def main(cls, args, repository, **kwargs):
+import jinja2
+
 if isinstance(repository, local.Git):
 if 'true' != repository.config().get('webkitscmpy.setup', ''):
 info_url = 'https://github.com/WebKit/WebKit/wiki/Git-Config#Configuration-Options'






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [294442] trunk/Tools/Scripts/libraries/webkitscmpy

2022-05-18 Thread jbedard
Title: [294442] trunk/Tools/Scripts/libraries/webkitscmpy








Revision 294442
Author jbed...@apple.com
Date 2022-05-18 15:22:52 -0700 (Wed, 18 May 2022)


Log Message
[git-webkit] Remove space in radar URLs
https://bugs.webkit.org/show_bug.cgi?id=240592


Reviewed by Chris Dumez.

* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/pull_request.py:
(PullRequest):
(PullRequest.escape_html):
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:

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

Modified Paths

trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/pull_request.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py




Diff

Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (294441 => 294442)

--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-05-18 22:16:44 UTC (rev 294441)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-05-18 22:22:52 UTC (rev 294442)
@@ -29,7 +29,7 @@
 
 setup(
 name='webkitscmpy',
-version='4.14.1',
+version='4.14.2',
 description='Library designed to interact with git and svn repositories.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (294441 => 294442)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-05-18 22:16:44 UTC (rev 294441)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-05-18 22:22:52 UTC (rev 294442)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(4, 14, 1)
+version = Version(4, 14, 2)
 
 AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
 AutoInstall.register(Package('jinja2', Version(2, 11, 3)))


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/pull_request.py (294441 => 294442)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/pull_request.py	2022-05-18 22:16:44 UTC (rev 294441)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/pull_request.py	2022-05-18 22:22:52 UTC (rev 294442)
@@ -74,7 +74,7 @@
 ESCAPE_TABLE = {
 '"': '',
 "'": '',
-'>': ' ',
+'>': '',
 '<': '',
 '&': '',
 }
@@ -82,7 +82,7 @@
 @classmethod
 def escape_html(cls, message):
 message = ''.join(cls.ESCAPE_TABLE.get(c, c) for c in message)
-return re.sub(r'(https?://[^\s<>,:;]+)', r'+return re.sub(r'(https?://[^\s<>,:;]+?)(?=[\s<>,:;]|())', r' 
 @classmethod
 def unescape_html(cls, message):


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py (294441 => 294442)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py	2022-05-18 22:16:44 UTC (rev 294441)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py	2022-05-18 22:22:52 UTC (rev 294442)
@@ -76,16 +76,20 @@
 self.assertEqual(commits[0].message, '[scoping] Bug to fix\n\nReviewed by Tim Contributor.')
 
 def test_create_body_multiple_linked(self):
+self.maxDiff = None
 self.assertEqual(
 PullRequest.create_body(None, [Commit(
 hash='11aa76f9fc380e9fe06157154f32b304e8dc4749',
-message='[scoping] Bug to fix (Part 2)\nhttps://bugs.webkit.org/1234\n\nReviewed by Tim Contributor.\n',
+message='[scoping] Bug to fix (Part 3)\nhttps://bugs.webkit.org/1234\n\nReviewed by Tim Contributor.\n',
 ), Commit(
 hash='53ea230fcedbce327eb1c45a6ab65a88de864505',
-message='[scoping] Bug to fix (Part 1)\n\n\nReviewed by Tim Contributor.\n',
+message='[scoping] Bug to fix (Part 2)\n\n\nReviewed by Tim Contributor.\n',
+), Commit(
+hash='ccc39e76f938a1685e388991fc3127a85d0be0f0',
+message='[scoping] Bug to fix (Part 1)\n\n\nReviewed by Tim Contributor.\n',
 )]), ''' 11aa76f9fc380e9fe06157154f32b304e8dc4749
 
-[scoping] Bug to fix (Part 2)
+[scoping] Bug to fix (Part 3)
  
 Reviewed by Tim Contributor.
@@ -93,8 +97,16 @@
 --
  53ea230fcedbce327eb1c45a6ab65a88de864505
 
+[scoping] Bug to fix (Part 2)
+
+--
+ ccc39e76f938a1685e388991fc3127a85d0be0f0
+
 [scoping] Bug to fix (Part 1)
-+rdar:///1234
 
 Reviewed by Tim Contributor.
 ''',
@@ -160,7 +172,7 @@
  53ea230fcedbce327eb1c45a6ab65a88de864505
 
 [scoping] Bug to fix (Part 1)
-+ 
 Reviewed by Tim Contributor.
 ''')







[webkit-changes] [294407] trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/ git_hub.py

2022-05-18 Thread jbedard
Title: [294407] trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py








Revision 294407
Author jbed...@apple.com
Date 2022-05-18 11:07:44 -0700 (Wed, 18 May 2022)


Log Message
[git-webkit] Support non-members updating PRs
https://bugs.webkit.org/show_bug.cgi?id=240550


Reviewed by Brent Fulgham.

* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py:
(GitHub.PRGenerator.update):

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

Modified Paths

trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py




Diff

Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py (294406 => 294407)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py	2022-05-18 17:59:10 UTC (rev 294406)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py	2022-05-18 18:07:44 UTC (rev 294407)
@@ -203,7 +203,7 @@
 if user not in assignees:
 issue = pull_request._metadata.get('issue')
 if not issue or not issue.tracker or not issue.assign(issue.tracker.me()):
-sys.stderr.write("Failed to assign '{}' to '{}'\n".format(result, user))
+sys.stderr.write("Failed to assign '{}' to '{}'\n".format(pull_request, user))
 
 return pull_request
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [294403] trunk/Tools/CISupport/ews-build

2022-05-18 Thread jbedard
Title: [294403] trunk/Tools/CISupport/ews-build








Revision 294403
Author jbed...@apple.com
Date 2022-05-18 10:26:42 -0700 (Wed, 18 May 2022)


Log Message
[Commit-Queue] Forbid ChangeLog modification (Follow-up)
https://bugs.webkit.org/show_bug.cgi?id=240461


Reviewed by Alexey Proskuryakov.

* Tools/CISupport/ews-build/steps.py:
(CleanGitRepo.run): Abort any in progress `git am` commands.
* Tools/CISupport/ews-build/steps_unittest.py:

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

Modified Paths

trunk/Tools/CISupport/ews-build/steps.py
trunk/Tools/CISupport/ews-build/steps_unittest.py




Diff

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

--- trunk/Tools/CISupport/ews-build/steps.py	2022-05-18 17:01:14 UTC (rev 294402)
+++ trunk/Tools/CISupport/ews-build/steps.py	2022-05-18 17:26:42 UTC (rev 294403)
@@ -4419,6 +4419,7 @@
 self.commands = []
 for command in [
 self.shell_command('git rebase --abort || {}'.format(self.shell_exit_0())),
+self.shell_command('git am --abort || {}'.format(self.shell_exit_0())),
 ['git', 'clean', '-f', '-d'],  # Remove any left-over layout test results, added files, etc.
 ['git', 'fetch', self.git_remote],  # Avoid updating the working copy to a stale revision.
 ['git', 'checkout', '{}/{}'.format(self.git_remote, branch), '-f'],  # Checkout branch from specific remote


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

--- trunk/Tools/CISupport/ews-build/steps_unittest.py	2022-05-18 17:01:14 UTC (rev 294402)
+++ trunk/Tools/CISupport/ews-build/steps_unittest.py	2022-05-18 17:26:42 UTC (rev 294403)
@@ -4805,6 +4805,8 @@
 self.expectRemoteCommands(
 ExpectShell(command=['/bin/sh', '-c', 'git rebase --abort || true'], workdir='wkdir', timeout=300, logEnviron=False) + 0
 + ExpectShell.log('stdio', stdout=''),
+ExpectShell(command=['/bin/sh', '-c', 'git am --abort || true'], workdir='wkdir', timeout=300, logEnviron=False) + 0
++ ExpectShell.log('stdio', stdout=''),
 ExpectShell(command=['git', 'clean', '-f', '-d'], workdir='wkdir', timeout=300, logEnviron=False) + 0
 + ExpectShell.log('stdio', stdout=''),
 ExpectShell(command=['git', 'fetch', 'origin'], workdir='wkdir', timeout=300, logEnviron=False) + 0
@@ -4831,6 +4833,8 @@
 self.expectRemoteCommands(
 ExpectShell(command=['sh', '-c', 'git rebase --abort || exit 0'], workdir='wkdir', timeout=300, logEnviron=False) + 0
 + ExpectShell.log('stdio', stdout=''),
+ExpectShell(command=['sh', '-c', 'git am --abort || exit 0'], workdir='wkdir', timeout=300, logEnviron=False) + 0
++ ExpectShell.log('stdio', stdout=''),
 ExpectShell(command=['git', 'clean', '-f', '-d'], workdir='wkdir', timeout=300, logEnviron=False) + 0
 + ExpectShell.log('stdio', stdout=''),
 ExpectShell(command=['git', 'fetch', 'origin'], workdir='wkdir', timeout=300, logEnviron=False) + 0
@@ -4856,6 +4860,8 @@
 self.expectRemoteCommands(
 ExpectShell(command=['/bin/sh', '-c', 'git rebase --abort || true'], workdir='wkdir', timeout=300, logEnviron=False) + 0
 + ExpectShell.log('stdio', stdout=''),
+ExpectShell(command=['/bin/sh', '-c', 'git am --abort || true'], workdir='wkdir', timeout=300, logEnviron=False) + 0
++ ExpectShell.log('stdio', stdout=''),
 ExpectShell(command=['git', 'clean', '-f', '-d'], workdir='wkdir', timeout=300, logEnviron=False) + 0
 + ExpectShell.log('stdio', stdout=''),
 ExpectShell(command=['git', 'fetch', 'origin'], workdir='wkdir', timeout=300, logEnviron=False) + 0
@@ -4881,6 +4887,8 @@
 self.expectRemoteCommands(
 ExpectShell(command=['/bin/sh', '-c', 'git rebase --abort || true'], workdir='wkdir', timeout=300, logEnviron=False) + 0
 + ExpectShell.log('stdio', stdout=''),
+ExpectShell(command=['/bin/sh', '-c', 'git am --abort || true'], workdir='wkdir', timeout=300, logEnviron=False) + 0
++ ExpectShell.log('stdio', stdout=''),
 ExpectShell(command=['git', 'clean', '-f', '-d'], workdir='wkdir', timeout=300, logEnviron=False) + 0
 + ExpectShell.log('stdio', stdout=''),
 ExpectShell(command=['git', 'fetch', 'origin'], workdir='wkdir', timeout=300, logEnviron=False) + 128
@@ -4907,6 +4915,8 @@
 self.expectRemoteCommands(
 ExpectShell(command=['/bin/sh', '-c', 'git rebase --abort || true'], workdir='wkdir', timeout=300, logEnviron=False) + 0
 + ExpectShell.log('stdio', stdout=''),
+ExpectShell(command=['/bin/sh', '-c', 'git am --abort || true'], workdir='wkdir', timeout=300, logEnviron=False) + 0
++ ExpectShell.log('stdio', stdout=''),
 ExpectShell(command=['git', 'clean', 

[webkit-changes] [294336] trunk/Tools/CISupport/ews-build

2022-05-17 Thread jbedard
Title: [294336] trunk/Tools/CISupport/ews-build








Revision 294336
Author jbed...@apple.com
Date 2022-05-17 13:10:39 -0700 (Tue, 17 May 2022)


Log Message
Forbid ChangeLog modification (Follow-up fix) 
https://bugs.webkit.org/show_bug.cgi?id=240461


Reviewed by Aakash Jain.

Run Canonicalize on committed patches.

* Tools/CISupport/ews-build/steps.py:
(Canonicalize.doStepIf): Deleted.
(Canonicalize.hideStepIf): Deleted.
* Tools/CISupport/ews-build/steps_unittest.py:

Modified Paths

trunk/Tools/CISupport/ews-build/steps.py
trunk/Tools/CISupport/ews-build/steps_unittest.py




Diff

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

--- trunk/Tools/CISupport/ews-build/steps.py	2022-05-17 19:58:18 UTC (rev 294335)
+++ trunk/Tools/CISupport/ews-build/steps.py	2022-05-17 20:10:39 UTC (rev 294336)
@@ -5116,13 +5116,7 @@
 return {'step': f'Failed to canonicalize {commit_pluralized}'}
 return super(Canonicalize, self).getResultSummary()
 
-def doStepIf(self, step):
-return self.getProperty('github.number', False)
 
-def hideStepIf(self, results, step):
-return not self.doStepIf(step)
-
-
 class PushPullRequestBranch(shell.ShellCommand):
 name = 'push-pull-request-branch'
 haltOnFailure = True


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

--- trunk/Tools/CISupport/ews-build/steps_unittest.py	2022-05-17 19:58:18 UTC (rev 294335)
+++ trunk/Tools/CISupport/ews-build/steps_unittest.py	2022-05-17 20:10:39 UTC (rev 294336)
@@ -6206,10 +6206,29 @@
 def tearDown(self):
 return self.tearDownBuildStep()
 
-def test_skipped_patch(self):
+def test_patch(self):
 self.setupStep(Canonicalize())
 self.setProperty('patch_id', '1234')
-self.expectOutcome(result=SKIPPED, state_string='Canonicalize Commit (skipped)')
+
+self.expectRemoteCommands(
+ExpectShell(
+workdir='wkdir',
+timeout=300,
+logEnviron=False,
+command=['git', 'pull', 'origin', 'main', '--rebase'],
+) + 0, ExpectShell(
+workdir='wkdir',
+timeout=300,
+logEnviron=False,
+command=['git', 'checkout', 'main'],
+) + 0, ExpectShell(
+workdir='wkdir',
+timeout=300,
+logEnviron=False,
+command=['python3', 'Tools/Scripts/git-webkit', 'canonicalize', '-n', '1'],
+) + 0,
+)
+self.expectOutcome(result=SUCCESS, state_string='Canonicalized commit')
 return self.runStep()
 
 def test_success(self):






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [294327] trunk/Tools/CISupport/ews-build

2022-05-17 Thread jbedard
Title: [294327] trunk/Tools/CISupport/ews-build








Revision 294327
Author jbed...@apple.com
Date 2022-05-17 10:35:22 -0700 (Tue, 17 May 2022)


Log Message
Forbid ChangeLog modification 
https://bugs.webkit.org/show_bug.cgi?id=240461


Rubber-stamped by Aakash Jain.

* Tools/CISupport/ews-build/factories.py:
(CommitQueueFactory.__init__): Only accept patches with commit messages,
respect those commit messages.
(MergeQueueFactoryBase.__init__): Use commit author in commit.
* Tools/CISupport/ews-build/factories_unittest.py:
(TestExpectedBuildSteps.test_all_expected_steps):
* CISupport/ews-build/steps.py:
(CommitPatch): Add step which commits a patch, including it's commit message.
(PushCommitToWebKitRepo.evaluateCommand): Use GitHub checkout on Commit-Queue.
(ValidateSquashed.start): Support committed patches.
(AddReviewerToCommitMessage.start): Ditto.
(DetermineAuthor): Extract author from local commit.
(AddAuthorToCommitMessage): Use 'author' property as set by 'DetermineAuthor'.
(ValidateCommitMessage._files): Support patches.
(ValidateCommitMessage.run): Support committed patches.
(ValidateCommitMessage.getResultSummary): Support patches.
(Canonicalize.run): Support committed patches.
(ValidateSquashed.doStepIf): Deleted.
(ValidateSquashed.hideStepIf): Deleted.
(AddAuthorToCommitMessage.author): Deleted.
(ValidateCommitMessage.doStepIf): Deleted.
(ValidateCommitMessage.hideStepIf): Deleted.
* Tools/CISupport/ews-build/steps_unittest.py:

Modified Paths

trunk/Tools/CISupport/ews-build/factories.py
trunk/Tools/CISupport/ews-build/factories_unittest.py
trunk/Tools/CISupport/ews-build/steps.py
trunk/Tools/CISupport/ews-build/steps_unittest.py




Diff

Modified: trunk/Tools/CISupport/ews-build/factories.py (294326 => 294327)

--- trunk/Tools/CISupport/ews-build/factories.py	2022-05-17 17:31:26 UTC (rev 294326)
+++ trunk/Tools/CISupport/ews-build/factories.py	2022-05-17 17:35:22 UTC (rev 294327)
@@ -24,10 +24,10 @@
 from buildbot.process import factory
 from buildbot.steps import trigger
 
-from steps import (AddAuthorToCommitMessage, AddReviewerToCommitMessage, ApplyPatch, ApplyWatchList, Canonicalize,
+from steps import (AddAuthorToCommitMessage, AddReviewerToCommitMessage, ApplyPatch, ApplyWatchList, Canonicalize, CommitPatch,
CheckOutPullRequest, CheckOutSource, CheckOutSpecificRevision, CheckChangeRelevance,
CheckPatchStatusOnEWSQueues, CheckStyle, CleanGitRepo, CompileJSC, CompileWebKit, ConfigureBuild, CreateLocalGITCommit,
-   DownloadBuiltProduct, ExtractBuiltProduct, FetchBranches, FindModifiedChangeLogs, FindModifiedLayoutTests, GitSvnFetch,
+   DetermineAuthor, DownloadBuiltProduct, ExtractBuiltProduct, FetchBranches, FindModifiedChangeLogs, FindModifiedLayoutTests, GitSvnFetch,
InstallGtkDependencies, InstallWpeDependencies, KillOldProcesses, PrintConfiguration, PushCommitToWebKitRepo,
RunAPITests, RunBindingsTests, RunBuildWebKitOrgUnitTests, RunBuildbotCheckConfigForBuildWebKit, RunBuildbotCheckConfigForEWS,
RunEWSUnitTests, RunResultsdbpyTests, RunJavaScriptCoreTests, RunWebKit1Tests, RunWebKitPerlTests, RunWebKitPyPython2Tests,
@@ -292,15 +292,21 @@
 self.addStep(ValidateChange(verifycqplus=True))
 self.addStep(ValidateCommitterAndReviewer())
 self.addStep(PrintConfiguration())
-self.addStep(CleanGitRepo(default_branch='master'))
-self.addStep(CheckOutSource(repourl='https://git.webkit.org/git/WebKit-https'))
+self.addStep(CleanGitRepo())
+self.addStep(CheckOutSource())
+self.addStep(GitSvnFetch())  # FIXME: Remove when migrating to pure git
 self.addStep(FetchBranches())
 self.addStep(ShowIdentifier())
 self.addStep(VerifyGitHubIntegrity())
 self.addStep(UpdateWorkingDirectory())
-self.addStep(ApplyPatch())
-self.addStep(ValidateChangeLogAndReviewer())
-self.addStep(FindModifiedChangeLogs())
+self.addStep(CommitPatch())
+
+self.addStep(ValidateSquashed())
+self.addStep(AddReviewerToCommitMessage())
+self.addStep(DetermineAuthor())
+self.addStep(AddAuthorToCommitMessage())
+self.addStep(ValidateCommitMessage())
+
 self.addStep(KillOldProcesses())
 self.addStep(CompileWebKit(skipUpload=True))
 self.addStep(KillOldProcesses())
@@ -308,11 +314,8 @@
 self.addStep(CheckPatchStatusOnEWSQueues())
 self.addStep(RunWebKitTests())
 self.addStep(ValidateChange(addURLs=False, verifycqplus=True))
-self.addStep(CheckOutSource(repourl='https://git.webkit.org/git/WebKit-https'))
-self.addStep(ShowIdentifier())
-self.addStep(UpdateWorkingDirectory())
-self.addStep(ApplyPatch())
-self.addStep(CreateLocalGITCommit())
+
+self.addStep(Canonicalize())
 self.addStep(PushCommitToWebKitRepo())
 

[webkit-changes] [294323] trunk/Tools

2022-05-17 Thread jbedard
Title: [294323] trunk/Tools








Revision 294323
Author jbed...@apple.com
Date 2022-05-17 07:10:45 -0700 (Tue, 17 May 2022)


Log Message
[Merge-Queue] Forbid ChangeLog modification
https://bugs.webkit.org/show_bug.cgi?id=239413


Reviewed by Aakash Jain.

* Tools/CISupport/ews-build/factories.py:
(MergeQueueFactoryBase.__init__): Remove AddReviewerToChangeLog and ValidateChangeLogAndReviewer.
* CISupport/ews-build/factories_unittest.py:
(TestExpectedBuildSteps):
* Tools/CISupport/ews-build/steps.py:
(PushCommitToWebKitRepo.evaluateCommand): Remove AddReviewerToChangeLog.
(ValidateCommitMessage._files): List all modified files.
(ValidateCommitMessage.evaluateCommand): Fail step if no ChangeLog modified.
(AddReviewerToChangeLog): Deleted.
* Tools/CISupport/ews-build/steps_unittest.py:

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

Modified Paths

trunk/Tools/CISupport/ews-build/factories.py
trunk/Tools/CISupport/ews-build/factories_unittest.py
trunk/Tools/CISupport/ews-build/steps.py
trunk/Tools/CISupport/ews-build/steps_unittest.py
trunk/Tools/ChangeLog




Diff

Modified: trunk/Tools/CISupport/ews-build/factories.py (294322 => 294323)

--- trunk/Tools/CISupport/ews-build/factories.py	2022-05-17 13:22:50 UTC (rev 294322)
+++ trunk/Tools/CISupport/ews-build/factories.py	2022-05-17 14:10:45 UTC (rev 294323)
@@ -24,7 +24,7 @@
 from buildbot.process import factory
 from buildbot.steps import trigger
 
-from steps import (AddAuthorToCommitMessage, AddReviewerToCommitMessage, AddReviewerToChangeLog, ApplyPatch, ApplyWatchList, Canonicalize,
+from steps import (AddAuthorToCommitMessage, AddReviewerToCommitMessage, ApplyPatch, ApplyWatchList, Canonicalize,
CheckOutPullRequest, CheckOutSource, CheckOutSpecificRevision, CheckChangeRelevance,
CheckPatchStatusOnEWSQueues, CheckStyle, CleanGitRepo, CompileJSC, CompileWebKit, ConfigureBuild, CreateLocalGITCommit,
DownloadBuiltProduct, ExtractBuiltProduct, FetchBranches, FindModifiedChangeLogs, FindModifiedLayoutTests, GitSvnFetch,
@@ -335,9 +335,7 @@
 self.addStep(ValidateSquashed())
 self.addStep(AddReviewerToCommitMessage())
 self.addStep(AddAuthorToCommitMessage())
-self.addStep(AddReviewerToChangeLog())
 self.addStep(ValidateCommitMessage())
-self.addStep(ValidateChangeLogAndReviewer())
 
 
 class MergeQueueFactory(MergeQueueFactoryBase):


Modified: trunk/Tools/CISupport/ews-build/factories_unittest.py (294322 => 294323)

--- trunk/Tools/CISupport/ews-build/factories_unittest.py	2022-05-17 13:22:50 UTC (rev 294322)
+++ trunk/Tools/CISupport/ews-build/factories_unittest.py	2022-05-17 14:10:45 UTC (rev 294323)
@@ -642,9 +642,7 @@
 'validate-squashed',
 'add-reviewer-to-commit-message',
 'add-author-to-commit-message',
-'add-reviewer-to-changelog',
 'validate-commit-message',
-'validate-changelog-and-reviewer',
 'kill-old-processes',
 'compile-webkit',
 'kill-old-processes',
@@ -669,9 +667,7 @@
 'validate-squashed',
 'add-reviewer-to-commit-message',
 'add-author-to-commit-message',
-'add-reviewer-to-changelog',
 'validate-commit-message',
-'validate-changelog-and-reviewer',
 'validate-change',
 'canonicalize-commit',
 'push-commit-to-webkit-repo',


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

--- trunk/Tools/CISupport/ews-build/steps.py	2022-05-17 13:22:50 UTC (rev 294322)
+++ trunk/Tools/CISupport/ews-build/steps.py	2022-05-17 14:10:45 UTC (rev 294323)
@@ -4569,7 +4569,6 @@
 CheckOutPullRequest(),
 AddReviewerToCommitMessage(),
 AddAuthorToCommitMessage(),
-AddReviewerToChangeLog(),
 ValidateChange(verifyMergeQueue=True, verifyNoDraftForMergeQueue=True),
 Canonicalize(),
 PushCommitToWebKitRepo(),
@@ -4926,54 +4925,6 @@
 return not self.doStepIf(step)
 
 
-class AddReviewerToChangeLog(steps.ShellSequence, ShellMixin, AddReviewerMixin):
-name = 'add-reviewer-to-changelog'
-haltOnFailure = True
-
-def __init__(self, **kwargs):
-super(AddReviewerToChangeLog, self).__init__(logEnviron=False, timeout=60, **kwargs)
-
-def _files(self):
-sourcestamp = self.build.getSourceStamp(self.getProperty('codebase', ''))
-if sourcestamp and sourcestamp.changes:
-return sourcestamp.changes[0].files
-return []
-
-def run(self, BufferLogObserverClass=logobserver.BufferLogObserver):
-self.commands = []
-for file in self._files():
-if not file.startswith('+++') or not file.endswith('ChangeLog'):
-continue
-

[webkit-changes] [294250] trunk/Websites/bugs.webkit.org

2022-05-16 Thread jbedard
Title: [294250] trunk/Websites/bugs.webkit.org








Revision 294250
Author jbed...@apple.com
Date 2022-05-16 13:32:13 -0700 (Mon, 16 May 2022)


Log Message
[PrettyPatch] Support commit messages (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=240386


Unreviewed follow-up fix.

* Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb: Handle diffs without a header.

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

Modified Paths

trunk/Websites/bugs.webkit.org/ChangeLog
trunk/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb




Diff

Modified: trunk/Websites/bugs.webkit.org/ChangeLog (294249 => 294250)

--- trunk/Websites/bugs.webkit.org/ChangeLog	2022-05-16 19:00:08 UTC (rev 294249)
+++ trunk/Websites/bugs.webkit.org/ChangeLog	2022-05-16 20:32:13 UTC (rev 294250)
@@ -1,3 +1,13 @@
+2022-05-16  Jonathan Bedard  
+
+[PrettyPatch] Support commit messages (Follow-up fix)
+https://bugs.webkit.org/show_bug.cgi?id=240386
+
+
+Unreviewed follow-up fix.
+
+* PrettyPatch/PrettyPatch.rb: Handle diffs without a header.
+
 2022-05-13  Jonathan Bedard  
 
[PrettyPatch] Support commit messages


Modified: trunk/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb (294249 => 294250)

--- trunk/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb	2022-05-16 19:00:08 UTC (rev 294249)
+++ trunk/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb	2022-05-16 20:32:13 UTC (rev 294250)
@@ -797,6 +797,7 @@
 def self.parse(string)
 commitMessageLength = 0
 haveSeenDiffHeader = false
+haveCommitMessage = false
 subject = ''
 linesForDiffs = []
 line_array = string.lines.to_a
@@ -809,7 +810,7 @@
 haveSeenDiffHeader = false
 elsif (PrettyPatch.message_header?(line))
 haveSeenDiffHeader = false
-parsingSubject = true
+haveCommitMessage = true
 commitMessageLength = 1
 linesForDiffs << []
 linesForDiffs.last << '+++ COMMIT_MESSAGE'
@@ -836,7 +837,7 @@
 if (subject.empty? && commitMessageLength != 0)
 commitMessageLength += 1
 linesForDiffs.last << '+' + line unless linesForDiffs.last.nil?
-elsif (subject.empty? && haveSeenDiffHeader)
+elsif (subject.empty? && (!haveCommitMessage || haveSeenDiffHeader))
 linesForDiffs.last << line unless linesForDiffs.last.nil?
 end
 end






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [294212] trunk/Tools

2022-05-14 Thread jbedard
Title: [294212] trunk/Tools








Revision 294212
Author jbed...@apple.com
Date 2022-05-14 17:45:16 -0700 (Sat, 14 May 2022)


Log Message
[webkit-patch] Include commit messages in patches (Follow-up #2)
https://bugs.webkit.org/show_bug.cgi?id=240256


Unreviewed follow-up fix.


* Scripts/webkitpy/common/checkout/scm/git.py:
(Git.create_patch): Allow caller to exclude commit message, run `git diff` against HEAD by
default to include both staged and unstaged changes.
* Scripts/webkitpy/common/checkout/scm/scm.py:
(SCM.create_patch): Match function signature for git.
* Scripts/webkitpy/common/checkout/scm/scm_mock.py:
(MockSCM.create_patch): Match function signature for git.
* Scripts/webkitpy/common/checkout/scm/svn.py:
(SVN.create_patch): Match function signature for git.
* Scripts/webkitpy/w3c/test_exporter.py:
(WebPlatformTestExporter._wpt_patch): Exclude commit message since we won't be able
to classify it's file.
* Scripts/webkitpy/w3c/test_exporter_unittest.py:
(TestExporterTest.MockGit.create_patch): Match function signature for git.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/common/checkout/scm/git.py
trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm.py
trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm_mock.py
trunk/Tools/Scripts/webkitpy/common/checkout/scm/svn.py
trunk/Tools/Scripts/webkitpy/w3c/test_exporter.py
trunk/Tools/Scripts/webkitpy/w3c/test_exporter_unittest.py




Diff

Modified: trunk/Tools/ChangeLog (294211 => 294212)

--- trunk/Tools/ChangeLog	2022-05-14 22:39:40 UTC (rev 294211)
+++ trunk/Tools/ChangeLog	2022-05-15 00:45:16 UTC (rev 294212)
@@ -1,3 +1,26 @@
+2022-05-14  Jonathan Bedard  
+
+[webkit-patch] Include commit messages in patches (Follow-up #2) 
+https://bugs.webkit.org/show_bug.cgi?id=240256
+
+
+Unreviewed follow-up fix.
+
+* Scripts/webkitpy/common/checkout/scm/git.py:
+(Git.create_patch): Allow caller to exclude commit message, run `git diff` against HEAD by
+default to include both staged and unstaged changes.
+* Scripts/webkitpy/common/checkout/scm/scm.py:
+(SCM.create_patch): Match function signature for git.
+* Scripts/webkitpy/common/checkout/scm/scm_mock.py:
+(MockSCM.create_patch): Match function signature for git.
+* Scripts/webkitpy/common/checkout/scm/svn.py:
+(SVN.create_patch): Match function signature for git.
+* Scripts/webkitpy/w3c/test_exporter.py:
+(WebPlatformTestExporter._wpt_patch): Exclude commit message since we won't be able
+to classify it's file.
+* Scripts/webkitpy/w3c/test_exporter_unittest.py:
+(TestExporterTest.MockGit.create_patch): Match function signature for git.
+
 2022-05-14  Tyler Wilcock  
 
 AX: Remove CSSDisplayContentsAXSupportEnabled flag


Modified: trunk/Tools/Scripts/webkitpy/common/checkout/scm/git.py (294211 => 294212)

--- trunk/Tools/Scripts/webkitpy/common/checkout/scm/git.py	2022-05-14 22:39:40 UTC (rev 294211)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/scm/git.py	2022-05-15 00:45:16 UTC (rev 294212)
@@ -350,7 +350,7 @@
 
 return string_utils.encode("Subversion Revision: ") + string_utils.encode(revision) + string_utils.encode('\n') + string_utils.encode(diff)
 
-def create_patch(self, git_commit=None, changed_files=None, git_index=False):
+def create_patch(self, git_commit=None, changed_files=None, git_index=False, commit_message=True):
 """Returns a byte array (str()) representing the patch file.
 Patch files are effectively binary since they may contain files of multiple different encodings.
 If git_index is True, git_commit is ignored because only indexed files are handled.
@@ -358,7 +358,7 @@
 
 head = self.rev_parse('HEAD')
 merge_base = self.merge_base(git_commit)
-if merge_base == head:
+if not commit_message or merge_base == head:
 command = [self.executable_name, 'diff', '--binary', '--no-color', '--no-ext-diff', '--full-index', '--no-renames']
 else:
 command = [self.executable_name, 'format-patch', '--stdout', '--binary']
@@ -376,6 +376,8 @@
 command += [merge_base]
 elif merge_base != head:
 command += ['HEAD...{}'.format(merge_base)]
+else:
+command += ['HEAD']
 
 return self.run(command, decode_output=False, cwd=self.checkout_root)
 


Modified: trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm.py (294211 => 294212)

--- trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm.py	2022-05-14 22:39:40 UTC (rev 294211)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm.py	2022-05-15 00:45:16 UTC (rev 294212)
@@ -172,7 +172,7 @@
 def timestamp_of_native_revision(self, path, revision):
 self._subclass_must_implement()
 
-def create_patch(self, git_commit=None, changed_files=None):
+def create_patch(self, git_commit=None, 

[webkit-changes] [294194] trunk/Tools

2022-05-14 Thread jbedard
Title: [294194] trunk/Tools








Revision 294194
Author jbed...@apple.com
Date 2022-05-14 07:40:27 -0700 (Sat, 14 May 2022)


Log Message
[webkit-patch] Include commit messages in patches (Follow-up)
https://bugs.webkit.org/show_bug.cgi?id=240256


Unreviewed follow-up fix.

* Tools/Scripts/webkitpy/common/checkout/scm/git.py:
(Git.create_patch): Prefer commit specified by user.

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

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/common/checkout/scm/git.py




Diff

Modified: trunk/Tools/ChangeLog (294193 => 294194)

--- trunk/Tools/ChangeLog	2022-05-14 13:59:52 UTC (rev 294193)
+++ trunk/Tools/ChangeLog	2022-05-14 14:40:27 UTC (rev 294194)
@@ -1,3 +1,14 @@
+2022-05-14  Jonathan Bedard  
+
+[webkit-patch] Include commit messages in patches (Follow-up) 
+https://bugs.webkit.org/show_bug.cgi?id=240256
+
+
+Unreviewed follow-up fix.
+
+* Scripts/webkitpy/common/checkout/scm/git.py:
+(Git.create_patch): Prefer commit specified by user.
+
 2022-05-13  Jonathan Bedard  
 
 [webkit-patch] Apply patches commit messages


Modified: trunk/Tools/Scripts/webkitpy/common/checkout/scm/git.py (294193 => 294194)

--- trunk/Tools/Scripts/webkitpy/common/checkout/scm/git.py	2022-05-14 13:59:52 UTC (rev 294193)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/scm/git.py	2022-05-14 14:40:27 UTC (rev 294194)
@@ -372,6 +372,8 @@
 
 if git_index:
 command += ['--cached']
+elif git_commit:
+command += [merge_base]
 elif merge_base != head:
 command += ['HEAD...{}'.format(merge_base)]
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [294184] trunk/Tools

2022-05-13 Thread jbedard
Title: [294184] trunk/Tools








Revision 294184
Author jbed...@apple.com
Date 2022-05-13 18:42:44 -0700 (Fri, 13 May 2022)


Log Message
[webkit-patch] Apply patches commit messages
https://bugs.webkit.org/show_bug.cgi?id=240402


Reviewed by Dewei Zhu.

* Tools/Scripts/webkitpy/common/checkout/checkout.py:
(Checkout):
(filter_patch_content): Insert reviewer to git patch as we're applying it.
(apply_patch): If a patch has a commit subject, it contains commit messages
and we should apply those commit messages.

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

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/common/checkout/checkout.py




Diff

Modified: trunk/Tools/ChangeLog (294183 => 294184)

--- trunk/Tools/ChangeLog	2022-05-13 23:37:58 UTC (rev 294183)
+++ trunk/Tools/ChangeLog	2022-05-14 01:42:44 UTC (rev 294184)
@@ -1,5 +1,19 @@
 2022-05-13  Jonathan Bedard  
 
+[webkit-patch] Apply patches commit messages
+https://bugs.webkit.org/show_bug.cgi?id=240402
+
+
+Reviewed by Dewei Zhu.
+
+* Scripts/webkitpy/common/checkout/checkout.py:
+(Checkout):
+(filter_patch_content): Insert reviewer to git patch as we're applying it.
+(apply_patch): If a patch has a commit subject, it contains commit messages
+and we should apply those commit messages.
+
+2022-05-13  Jonathan Bedard  
+
 [webkit-patch] Include commit messages in patches
 https://bugs.webkit.org/show_bug.cgi?id=240256
 


Modified: trunk/Tools/Scripts/webkitpy/common/checkout/checkout.py (294183 => 294184)

--- trunk/Tools/Scripts/webkitpy/common/checkout/checkout.py	2022-05-13 23:37:58 UTC (rev 294183)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/checkout.py	2022-05-14 01:42:44 UTC (rev 294184)
@@ -27,9 +27,10 @@
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
+import re
 import sys
 
-from webkitcorepy import StringIO
+from webkitcorepy import StringIO, string_utils
 
 from webkitpy.common.config import urls
 from webkitpy.common.checkout.changelog import ChangeLog, parse_bug_id_from_changelog
@@ -47,6 +48,27 @@
 # FIXME: Move a bunch of ChangeLog-specific processing from SCM to this object.
 # NOTE: All paths returned from this class should be absolute.
 class Checkout(object):
+COMMIT_SUBJECT_RE = re.compile(b'Subject: \[PATCH ?(\d+\/\d+)?] (.+)')
+FILTER_BRANCH_PROGRAM = '''import re
+import sys
+
+lines = [l for l in sys.stdin]
+for s in re.split(r' (Need the bug URL \(OOPS!\).)|(\S+:\/\/\S+)', lines[0].rstrip()):
+if s and s != ' ':
+print(s)
+for l in lines[1:]:
+sys.stdout.write(l)
+'''
+
+@classmethod
+def filter_patch_content(cls, content, reviewer=None):
+new_content = b''
+for line in string_utils.encode(content).splitlines():
+if b'Reviewed by NOBODY (OOPS!).' == line and reviewer:
+line = b'Reviewed by ' + string_utils.encode(reviewer) + b'.'
+new_content += line + b'\n'
+return new_content
+
 def __init__(self, scm, executive=None, filesystem=None):
 self._scm = scm
 # FIXME: We shouldn't be grabbing at private members on scm.
@@ -164,15 +186,28 @@
 pass  # We might not have ChangeLogs.
 
 def apply_patch(self, patch):
-# It's possible that the patch was not made from the root directory.
-# We should detect and handle that case.
 # FIXME: Move _scm.script_path here once we get rid of all the dependencies.
 # --force (continue after errors) is the common case, so we always use it.
-args = [self.script_path('svn-apply'), "--force"]
-if patch.reviewer():
-args += ['--reviewer', patch.reviewer().full_name]
-self._executive.run_command(args, input=patch.contents(), cwd=self._scm.checkout_root)
+from webkitpy.common.checkout.scm import Git
 
+encoded_patch = string_utils.encode(patch.contents())
+num_commits = len(self.COMMIT_SUBJECT_RE.findall(encoded_patch))
+if isinstance(self._scm, Git) and num_commits:
+self._executive.run_command(
+['git', 'am'],
+input=self.filter_patch_content(encoded_patch, reviewer=patch.reviewer().full_name if patch.reviewer() else None),
+cwd=self._scm.checkout_root,
+)
+self._executive.run_command(
+['git', 'filter-branch', '-f', '--msg-filter', '{} -c "{}"'.format(sys.executable, self.FILTER_BRANCH_PROGRAM), 'HEAD...HEAD~{}'.format(num_commits)],
+cwd=self._scm.checkout_root,
+)
+else:
+args = [self.script_path('svn-apply'), "--force"]
+if patch.reviewer():
+args += ['--reviewer', patch.reviewer().full_name]
+self._executive.run_command(args, input=patch.contents(), 

[webkit-changes] [294183] trunk/Tools

2022-05-13 Thread jbedard
Title: [294183] trunk/Tools








Revision 294183
Author jbed...@apple.com
Date 2022-05-13 16:37:58 -0700 (Fri, 13 May 2022)


Log Message
[webkit-patch] Include commit messages in patches
https://bugs.webkit.org/show_bug.cgi?id=240256


Rubber-stamped by Aakash Jain.

* Scripts/webkitpy/common/checkout/checkout.py:
(Checkout.commit_message_for_this_commit): If no changelogs are modified, prefer
the commit message.
* Scripts/webkitpy/common/checkout/diff_parser.py:
(DiffParser._parse_into_diff_files): Ignore commit message headers.
* Scripts/webkitpy/common/checkout/scm/git.py:
(Git.create_patch): Prefer `git format-patch` when local commits are available.
(Git.rev_parse): Determine hash for ref.
(Git.format_patch): Deleted.
(Git.request_pull): Deleted.
* Scripts/webkitpy/tool/steps/abstractstep.py:
(AbstractStep): Keep record of local commit.
* Scripts/webkitpy/tool/steps/editchangelog.py:
(EditChangeLog.run): Do not edit changelog if no changelog is present.
* Scripts/webkitpy/tool/steps/preparechangelog.py:
(PrepareChangeLog.run): Do not prepare changelog if local commit is present.

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

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/common/checkout/checkout.py
trunk/Tools/Scripts/webkitpy/common/checkout/diff_parser.py
trunk/Tools/Scripts/webkitpy/common/checkout/scm/git.py
trunk/Tools/Scripts/webkitpy/tool/steps/abstractstep.py
trunk/Tools/Scripts/webkitpy/tool/steps/editchangelog.py
trunk/Tools/Scripts/webkitpy/tool/steps/preparechangelog.py




Diff

Modified: trunk/Tools/ChangeLog (294182 => 294183)

--- trunk/Tools/ChangeLog	2022-05-13 23:12:14 UTC (rev 294182)
+++ trunk/Tools/ChangeLog	2022-05-13 23:37:58 UTC (rev 294183)
@@ -1,3 +1,28 @@
+2022-05-13  Jonathan Bedard  
+
+[webkit-patch] Include commit messages in patches
+https://bugs.webkit.org/show_bug.cgi?id=240256
+
+
+Rubber-stamped by Aakash Jain.
+
+* Scripts/webkitpy/common/checkout/checkout.py:
+(Checkout.commit_message_for_this_commit): If no changelogs are modified, prefer
+the commit message.
+* Scripts/webkitpy/common/checkout/diff_parser.py:
+(DiffParser._parse_into_diff_files): Ignore commit message headers.
+* Scripts/webkitpy/common/checkout/scm/git.py:
+(Git.create_patch): Prefer `git format-patch` when local commits are available.
+(Git.rev_parse): Determine hash for ref.
+(Git.format_patch): Deleted.
+(Git.request_pull): Deleted.
+* Scripts/webkitpy/tool/steps/abstractstep.py:
+(AbstractStep): Keep record of local commit.
+* Scripts/webkitpy/tool/steps/editchangelog.py:
+(EditChangeLog.run): Do not edit changelog if no changelog is present.
+* Scripts/webkitpy/tool/steps/preparechangelog.py:
+(PrepareChangeLog.run): Do not prepare changelog if local commit is present.
+
 2022-05-13  Wenson Hsieh  
 
 ImageAnalysisQueue should reanalyze image elements whose image sources have changed


Modified: trunk/Tools/Scripts/webkitpy/common/checkout/checkout.py (294182 => 294183)

--- trunk/Tools/Scripts/webkitpy/common/checkout/checkout.py	2022-05-13 23:12:14 UTC (rev 294182)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/checkout.py	2022-05-13 23:37:58 UTC (rev 294183)
@@ -1,4 +1,5 @@
 # Copyright (c) 2010 Google Inc. All rights reserved.
+# Copyright (c) 2022 Apple Inc. All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions are
@@ -36,6 +37,7 @@
 from webkitpy.common.checkout.scm import CommitMessage
 from webkitpy.common.memoized import memoized
 from webkitpy.common.system.executive import ScriptError
+from webkitpy.common.checkout.scm import Git
 
 if sys.version_info > (3, 0):
 from functools import reduce
@@ -133,6 +135,9 @@
 
 def commit_message_for_this_commit(self, git_commit, changed_files=None, return_stderr=False):
 changelog_paths = self.modified_changelogs(git_commit, changed_files)
+if not len(changelog_paths) and isinstance(self._scm, Git):
+if self._scm.merge_base(None) != self._scm.rev_parse('HEAD'):
+return self._scm.commit_message_for_local_commit(git_commit or 'HEAD')
 if not len(changelog_paths):
 raise ScriptError(message="Found no modified ChangeLogs, cannot create a commit message.\n"
   "All changes require a ChangeLog.  See:\n %s" % urls.contribution_guidelines)


Modified: trunk/Tools/Scripts/webkitpy/common/checkout/diff_parser.py (294182 => 294183)

--- trunk/Tools/Scripts/webkitpy/common/checkout/diff_parser.py	2022-05-13 23:12:14 UTC (rev 294182)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/diff_parser.py	2022-05-13 23:37:58 UTC (rev 294183)
@@ -1,4 +1,5 @@
 # Copyright (C) 2009 Google Inc. All rights reserved.
+# Copyright (c) 2022 Apple Inc. All rights 

[webkit-changes] [294161] trunk/Websites/bugs.webkit.org

2022-05-13 Thread jbedard
Title: [294161] trunk/Websites/bugs.webkit.org








Revision 294161
Author jbed...@apple.com
Date 2022-05-13 10:05:55 -0700 (Fri, 13 May 2022)


Log Message
[PrettyPatch] Support commit messages
https://bugs.webkit.org/show_bug.cgi?id=240386


Rubber-stamped by Aakash Jain.

* Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:
(PrettyPatch.message_header): Match a commit message header.
(PrettyPatch.message_footer): Match a commit message footer.
(PrettyPatch.MESSAGE_HEADER_FORMATS): List of commit message headers.
(PrettyPatch.BUG_URL_RE): Regex to match bug urls in subject.
(PrettyPatch.MESSAGE_FOOTER_FORMATS): List of commit messagae footers.
(PrettyPatch.parse): Treat commit messages a new file named 'COMMIT_MESSAGE'.

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

Modified Paths

trunk/Websites/bugs.webkit.org/ChangeLog
trunk/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb




Diff

Modified: trunk/Websites/bugs.webkit.org/ChangeLog (294160 => 294161)

--- trunk/Websites/bugs.webkit.org/ChangeLog	2022-05-13 16:31:40 UTC (rev 294160)
+++ trunk/Websites/bugs.webkit.org/ChangeLog	2022-05-13 17:05:55 UTC (rev 294161)
@@ -1,3 +1,19 @@
+2022-05-13  Jonathan Bedard  
+
+   [PrettyPatch] Support commit messages
+   https://bugs.webkit.org/show_bug.cgi?id=240386
+   
+
+   Rubber-stamped by Aakash Jain.
+
+   * PrettyPatch/PrettyPatch.rb:
+   (PrettyPatch.message_header): Match a commit message header.
+   (PrettyPatch.message_footer): Match a commit message footer.
+   (PrettyPatch.MESSAGE_HEADER_FORMATS): List of commit message headers.
+   (PrettyPatch.BUG_URL_RE): Regex to match bug urls in subject.
+   (PrettyPatch.MESSAGE_FOOTER_FORMATS): List of commit messagae footers.
+   (PrettyPatch.parse): Treat commit messages a new file named 'COMMIT_MESSAGE'.
+
 2022-05-09  Jonathan Bedard  
 
 [bugs.webkit.org] Use GitHub as baseline when diffing


Modified: trunk/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb (294160 => 294161)

--- trunk/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb	2022-05-13 16:31:40 UTC (rev 294160)
+++ trunk/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb	2022-05-13 17:05:55 UTC (rev 294161)
@@ -47,6 +47,14 @@
 RELAXED_DIFF_HEADER_FORMATS.any? { |format| line =~ format }
 end
 
+def self.message_header?(line)
+MESSAGE_HEADER_FORMATS.any? { |format| line =~ format }
+end
+
+def self.message_footer?(line)
+MESSAGE_FOOTER_FORMATS.any? { |format| line =~ format }
+end
+
 private
 DIFF_HEADER_FORMATS = [
 /^Index: (.*)\r?$/,
@@ -59,6 +67,16 @@
 /^diff/
 ]
 
+MESSAGE_HEADER_FORMATS = [
+/^Subject: \[PATCH ?(\d+\/\d+)?\] (.+)/
+]
+
+BUG_URL_RE = / (Need the bug URL \(OOPS!\).)|(\S+:\/\/\S+)/
+
+MESSAGE_FOOTER_FORMATS = [
+/^---/
+]
+
 RENAME_FROM = /^rename from (.*)/
 
 SVN_BINARY_FILE_MARKER_FORMAT = /^Cannot display: file marked as a binary type.$/
@@ -777,7 +795,9 @@
 end
 
 def self.parse(string)
+commitMessageLength = 0
 haveSeenDiffHeader = false
+subject = ''
 linesForDiffs = []
 line_array = string.lines.to_a
 line_array.each_with_index do |line, index|
@@ -787,8 +807,38 @@
 elsif (!haveSeenDiffHeader && line =~ /^--- / && line_array[index + 1] =~ /^\+\+\+ /)
 linesForDiffs << []
 haveSeenDiffHeader = false
+elsif (PrettyPatch.message_header?(line))
+haveSeenDiffHeader = false
+parsingSubject = true
+commitMessageLength = 1
+linesForDiffs << []
+linesForDiffs.last << '+++ COMMIT_MESSAGE'
+if line[MESSAGE_HEADER_FORMATS[0], 1]
+linesForDiffs.last[-1] += ' (' + line[MESSAGE_HEADER_FORMATS[0], 1] + ')'
+end
+linesForDiffs.last << '@@ -0,0 +1,1 @@'
+subject = line[MESSAGE_HEADER_FORMATS[0], 2]
+elsif (!subject.empty? && line.strip.empty?)
+subject.split(BUG_URL_RE).each { |mtch|
+if !mtch.strip.empty?
+commitMessageLength += 1
+linesForDiffs.last << '+' + mtch
+end
+}
+subject = ''
+elsif (!subject.empty?)
+subject += line
+elsif (commitMessageLength != 0 && PrettyPatch.message_footer?(line))
+linesForDiffs.last[1] = '@@ -0,0 +1,' + commitMessageLength.to_s + ' @@'
+commitMessageLength = 0
 end
-linesForDiffs.last << line unless linesForDiffs.last.nil?
+
+if (subject.empty? && commitMessageLength != 0)
+

[webkit-changes] [294074] trunk

2022-05-11 Thread jbedard
Title: [294074] trunk








Revision 294074
Author jbed...@apple.com
Date 2022-05-11 14:47:25 -0700 (Wed, 11 May 2022)


Log Message
Remove Subversion references from ReadMe
https://bugs.webkit.org/show_bug.cgi?id=240316


Reviewed by Geoffrey Garen.

* ReadMe.md:

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

Modified Paths

trunk/ChangeLog
trunk/ReadMe.md




Diff

Modified: trunk/ChangeLog (294073 => 294074)

--- trunk/ChangeLog	2022-05-11 21:43:36 UTC (rev 294073)
+++ trunk/ChangeLog	2022-05-11 21:47:25 UTC (rev 294074)
@@ -1,3 +1,13 @@
+2022-05-11  Jonathan Bedard  
+
+Remove Subversion references from ReadMe
+https://bugs.webkit.org/show_bug.cgi?id=240316
+
+
+Reviewed by Geoffrey Garen.
+
+* ReadMe.md:
+
 2022-05-06  Sihui Liu  
 
 Unreviewed, add github info to contributors.json.


Modified: trunk/ReadMe.md (294073 => 294074)

--- trunk/ReadMe.md	2022-05-11 21:43:36 UTC (rev 294073)
+++ trunk/ReadMe.md	2022-05-11 21:47:25 UTC (rev 294074)
@@ -44,14 +44,6 @@
 
 For information about this, and other aspects of using Git with WebKit, read [the wiki page](https://trac.webkit.org/wiki/UsingGitWithWebKit).
 
-### Checking out the Subversion Repository
-
-If you don't want to use Git, run the following command to check out WebKit's Subversion repository:
-
-```
-svn checkout https://svn.webkit.org/repository/webkit/trunk WebKit
-```
-
 ## Building WebKit
 
 ### Building macOS Port






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [294064] trunk/metadata/contributors.json

2022-05-11 Thread jbedard
Title: [294064] trunk/metadata/contributors.json








Revision 294064
Author jbed...@apple.com
Date 2022-05-11 11:47:10 -0700 (Wed, 11 May 2022)


Log Message
Add my GitHub account name to contributors.json.

Reviewed by Jonathan Bedard.

* metadata/contributors.json:

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

Modified Paths

trunk/metadata/contributors.json




Diff

Modified: trunk/metadata/contributors.json (294063 => 294064)

--- trunk/metadata/contributors.json	2022-05-11 18:35:14 UTC (rev 294063)
+++ trunk/metadata/contributors.json	2022-05-11 18:47:10 UTC (rev 294064)
@@ -3327,6 +3327,7 @@
   "emails" : [
  "je...@apple.com"
   ],
+  "github" : "jeffmapple",
   "name" : "Jeff Miller",
   "nicks" : [
  "jeffm7"






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [294038] trunk/Tools

2022-05-10 Thread jbedard
Title: [294038] trunk/Tools








Revision 294038
Author jbed...@apple.com
Date 2022-05-10 16:31:29 -0700 (Tue, 10 May 2022)


Log Message
[git-webkit] Fail quickly for invalid bugzilla credentials
https://bugs.webkit.org/show_bug.cgi?id=240182


Reviewed by Stephanie Lewis.

* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py:
(Branch.main): Check credentials before creating an issue, exit
program if issue creation fails.

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

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py




Diff

Modified: trunk/Tools/ChangeLog (294037 => 294038)

--- trunk/Tools/ChangeLog	2022-05-10 23:26:26 UTC (rev 294037)
+++ trunk/Tools/ChangeLog	2022-05-10 23:31:29 UTC (rev 294038)
@@ -1,5 +1,19 @@
 2022-05-10  Jonathan Bedard  
 
+[git-webkit] Fail quickly for invalid bugzilla credentials
+https://bugs.webkit.org/show_bug.cgi?id=240182
+
+
+Reviewed by Stephanie Lewis.
+
+* Scripts/libraries/webkitscmpy/setup.py: Bump version.
+* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
+* Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py:
+(Branch.main): Check credentials before creating an issue, exit
+program if issue creation fails.
+
+2022-05-10  Jonathan Bedard  
+
 Patch is merged via merge-queue, but bugzilla is not closed
 https://bugs.webkit.org/show_bug.cgi?id=240155
 


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (294037 => 294038)

--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-05-10 23:26:26 UTC (rev 294037)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-05-10 23:31:29 UTC (rev 294038)
@@ -29,7 +29,7 @@
 
 setup(
 name='webkitscmpy',
-version='4.14.0',
+version='4.14.1',
 description='Library designed to interact with git and svn repositories.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (294037 => 294038)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-05-10 23:26:26 UTC (rev 294037)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-05-10 23:31:29 UTC (rev 294038)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(4, 14, 0)
+version = Version(4, 14, 1)
 
 AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
 AutoInstall.register(Package('jinja2', Version(2, 11, 3)))


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py (294037 => 294038)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py	2022-05-10 23:26:26 UTC (rev 294037)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py	2022-05-10 23:31:29 UTC (rev 294038)
@@ -118,10 +118,15 @@
 
 if not issue and Tracker.instance():
 if ' ' in args.issue:
+if getattr(Tracker.instance(), 'credentials'):
+Tracker.instance().credentials(required=True, validate=True)
 issue = Tracker.instance().create(
 title=args.issue,
 description=Terminal.input('Issue description: '),
 )
+if not issue:
+sys.stderr.write('Failed to create new issue\n')
+return 1
 print("Created '{}'".format(issue))
 if issue and issue.title and not redact:
 args.issue = cls.to_branch_name(issue.title)






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [294014] trunk/Tools

2022-05-10 Thread jbedard
Title: [294014] trunk/Tools








Revision 294014
Author jbed...@apple.com
Date 2022-05-10 13:22:36 -0700 (Tue, 10 May 2022)


Log Message
Patch is merged via merge-queue, but bugzilla is not closed
https://bugs.webkit.org/show_bug.cgi?id=240155


Reviewed by Aakash Jain.

* CISupport/ews-build/steps.py:
(UpdatePullRequest): Allow subsequent steps to run if we fail to update a PR.

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

Modified Paths

trunk/Tools/CISupport/ews-build/steps.py
trunk/Tools/ChangeLog




Diff

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

--- trunk/Tools/CISupport/ews-build/steps.py	2022-05-10 19:58:58 UTC (rev 294013)
+++ trunk/Tools/CISupport/ews-build/steps.py	2022-05-10 20:22:36 UTC (rev 294014)
@@ -5121,7 +5121,7 @@
 
 class UpdatePullRequest(shell.ShellCommand, GitHubMixin, AddToLogMixin):
 name = 'update-pull-request'
-haltOnFailure = True
+haltOnFailure = False
 command = ['git', 'log', '-1', '--no-decorate']
 ESCAPE_TABLE = {
 '"': '',


Modified: trunk/Tools/ChangeLog (294013 => 294014)

--- trunk/Tools/ChangeLog	2022-05-10 19:58:58 UTC (rev 294013)
+++ trunk/Tools/ChangeLog	2022-05-10 20:22:36 UTC (rev 294014)
@@ -1,5 +1,16 @@
 2022-05-10  Jonathan Bedard  
 
+Patch is merged via merge-queue, but bugzilla is not closed
+https://bugs.webkit.org/show_bug.cgi?id=240155
+
+
+Reviewed by Aakash Jain.
+
+* CISupport/ews-build/steps.py:
+(UpdatePullRequest): Allow subsequent steps to run if we fail to update a PR.
+
+2022-05-10  Jonathan Bedard  
+
 [GitHub] `git commit` generates a nicely formatted commit log but is missing bug information
 https://bugs.webkit.org/show_bug.cgi?id=240254
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [294013] trunk/Websites/webkit.org

2022-05-10 Thread jbedard
Title: [294013] trunk/Websites/webkit.org








Revision 294013
Author jbed...@apple.com
Date 2022-05-10 12:58:58 -0700 (Tue, 10 May 2022)


Log Message
[webkit.org] Replace svn.webkit.org with GitHub
https://bugs.webkit.org/show_bug.cgi?id=240093


Reviewed by Ryan Haddad, Aakash Jain and Dewei Zhu.

* wp-content/themes/webkit/css-status.php: Replace svn.webkit.org with raw.githubusercontent.com.
* wp-content/themes/webkit/status.php: Ditto.
* wp-content/themes/webkit/team.php: Ditto.

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

Modified Paths

trunk/Websites/webkit.org/ChangeLog
trunk/Websites/webkit.org/wp-content/themes/webkit/css-status.php
trunk/Websites/webkit.org/wp-content/themes/webkit/status.php
trunk/Websites/webkit.org/wp-content/themes/webkit/team.php




Diff

Modified: trunk/Websites/webkit.org/ChangeLog (294012 => 294013)

--- trunk/Websites/webkit.org/ChangeLog	2022-05-10 18:42:44 UTC (rev 294012)
+++ trunk/Websites/webkit.org/ChangeLog	2022-05-10 19:58:58 UTC (rev 294013)
@@ -1,3 +1,15 @@
+2022-05-04  Jonathan Bedard  
+
+[webkit.org] Replace svn.webkit.org with GitHub
+https://bugs.webkit.org/show_bug.cgi?id=240093
+
+
+Reviewed by Ryan Haddad, Aakash Jain and Dewei Zhu.
+
+* wp-content/themes/webkit/css-status.php: Replace svn.webkit.org with raw.githubusercontent.com.
+* wp-content/themes/webkit/status.php: Ditto.
+* wp-content/themes/webkit/team.php: Ditto.
+
 2022-04-15  Jonathan Bedard  
 
 [webkit.org] Remove leading r from archive revisions (Follow-up fix)


Modified: trunk/Websites/webkit.org/wp-content/themes/webkit/css-status.php (294012 => 294013)

--- trunk/Websites/webkit.org/wp-content/themes/webkit/css-status.php	2022-05-10 18:42:44 UTC (rev 294012)
+++ trunk/Websites/webkit.org/wp-content/themes/webkit/css-status.php	2022-05-10 19:58:58 UTC (rev 294013)
@@ -29,8 +29,8 @@
 });
 }
 
-var origin = new URL("/");
-var loadCSSProperties = xhrPromise(new URL("/repository/webkit/trunk/Source/WebCore/css/CSSProperties.json", origin));
+var origin = new URL("https://raw.githubusercontent.com/");
+var loadCSSProperties = xhrPromise(new URL("/WebKit/WebKit/main/Source/WebCore/css/CSSProperties.json", origin));
 
 
 


Modified: trunk/Websites/webkit.org/wp-content/themes/webkit/status.php (294012 => 294013)

--- trunk/Websites/webkit.org/wp-content/themes/webkit/status.php	2022-05-10 18:42:44 UTC (rev 294012)
+++ trunk/Websites/webkit.org/wp-content/themes/webkit/status.php	2022-05-10 19:58:58 UTC (rev 294013)
@@ -28,9 +28,9 @@
 xhrRequest.send();
 });
 }
-var origin = new URL("/");
-var loadJavaScriptCoreFeatures = xhrPromise(new URL("/repository/webkit/trunk/Source/_javascript_Core/features.json", origin));
-var loadWebCoreFeatures = xhrPromise(new URL("/repository/webkit/trunk/Source/WebCore/features.json", origin));
+var origin = new URL("https://raw.githubusercontent.com/");
+var loadJavaScriptCoreFeatures = xhrPromise(new URL("/WebKit/WebKit/main/Source/_javascript_Core/features.json", origin));
+var loadWebCoreFeatures = xhrPromise(new URL("/WebKit/WebKit/main/Source/WebCore/features.json", origin));
 
 
 

[webkit-changes] [294011] trunk/Tools

2022-05-10 Thread jbedard
Title: [294011] trunk/Tools








Revision 294011
Author jbed...@apple.com
Date 2022-05-10 11:04:05 -0700 (Tue, 10 May 2022)


Log Message
[GitHub] `git commit` generates a nicely formatted commit log but is missing bug information
https://bugs.webkit.org/show_bug.cgi?id=240254


Reviewed by Chris Dumez.

* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py: Add "commit" program.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py:
(Branch.main): Invoke Commit.bug_urls.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py:
(FilteredCommand.parser): Typo fix in log message.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/commit.py: Added.
(Commit.parser):
(Commit.bug_urls): Extract a list of bug URLs from an issue.
(Commit.main): Extract commit message information from issue.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/commit_unittest.py:

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

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/commit_unittest.py


Added Paths

trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/commit.py




Diff

Modified: trunk/Tools/ChangeLog (294010 => 294011)

--- trunk/Tools/ChangeLog	2022-05-10 17:28:37 UTC (rev 294010)
+++ trunk/Tools/ChangeLog	2022-05-10 18:04:05 UTC (rev 294011)
@@ -1,3 +1,24 @@
+2022-05-10  Jonathan Bedard  
+
+[GitHub] `git commit` generates a nicely formatted commit log but is missing bug information
+https://bugs.webkit.org/show_bug.cgi?id=240254
+
+
+Reviewed by Chris Dumez.
+
+* Scripts/libraries/webkitscmpy/setup.py: Bump version.
+* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
+* Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py: Add "commit" program.
+* Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py:
+(Branch.main): Invoke Commit.bug_urls.
+* Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py:
+(FilteredCommand.parser): Typo fix in log message.
+* Scripts/libraries/webkitscmpy/webkitscmpy/program/commit.py: Added.
+(Commit.parser):
+(Commit.bug_urls): Extract a list of bug URLs from an issue.
+(Commit.main): Extract commit message information from issue.
+* Scripts/libraries/webkitscmpy/webkitscmpy/test/commit_unittest.py:
+
 2022-05-09  Oriol Brufau  
 
 [cssom] Don't index perspective/transform-origin-* in computed styles


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (294010 => 294011)

--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-05-10 17:28:37 UTC (rev 294010)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-05-10 18:04:05 UTC (rev 294011)
@@ -29,7 +29,7 @@
 
 setup(
 name='webkitscmpy',
-version='4.13.2',
+version='4.14.0',
 description='Library designed to interact with git and svn repositories.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (294010 => 294011)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-05-10 17:28:37 UTC (rev 294010)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-05-10 18:04:05 UTC (rev 294011)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(4, 13, 2)
+version = Version(4, 14, 0)
 
 AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
 AutoInstall.register(Package('jinja2', Version(2, 11, 3)))


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py (294010 => 294011)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py	2022-05-10 17:28:37 UTC (rev 294010)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py	2022-05-10 18:04:05 UTC (rev 294011)
@@ -30,6 +30,7 @@
 from .canonicalize import Canonicalize
 from .clean import Clean
 from .command import Command
+from .commit import Commit
 from .checkout import Checkout
 from .credentials import Credentials
 from .find import Find, Info
@@ -74,7 +75,12 @@
 )
 
 subparsers = parser.add_subparsers(help='sub-command help')
-programs = [Blame, Branch, Canonicalize, Checkout, Clean, Find, Info, Land, Log, Pull, PullRequest, Revert, Setup, InstallGitLFS, Credentials]
+programs = [
+Blame, Branch, 

[webkit-changes] [293992] trunk/Websites/bugs.webkit.org

2022-05-09 Thread jbedard
Title: [293992] trunk/Websites/bugs.webkit.org








Revision 293992
Author jbed...@apple.com
Date 2022-05-09 16:03:48 -0700 (Mon, 09 May 2022)


Log Message
[bugs.webkit.org] Use GitHub as baseline when diffing
https://bugs.webkit.org/show_bug.cgi?id=240073


Reviewed by Ryan Haddad and Dewei Zhu.

* Websites/bugs.webkit.org/code-review.js: Use GitHub instead of
Subversion for tip-of-tree baseline, blame and log links.
* Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb: Ditto.
Use GitHub instead of Subversion for tip-of-tree baseline.

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

Modified Paths

trunk/Websites/bugs.webkit.org/ChangeLog
trunk/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb
trunk/Websites/bugs.webkit.org/code-review-test.html
trunk/Websites/bugs.webkit.org/code-review.js




Diff

Modified: trunk/Websites/bugs.webkit.org/ChangeLog (293991 => 293992)

--- trunk/Websites/bugs.webkit.org/ChangeLog	2022-05-09 23:02:39 UTC (rev 293991)
+++ trunk/Websites/bugs.webkit.org/ChangeLog	2022-05-09 23:03:48 UTC (rev 293992)
@@ -1,3 +1,17 @@
+2022-05-09  Jonathan Bedard  
+
+[bugs.webkit.org] Use GitHub as baseline when diffing
+https://bugs.webkit.org/show_bug.cgi?id=240073
+
+
+Reviewed by Ryan Haddad and Dewei Zhu.
+
+* code-review.js: Use GitHub instead of Subversion for tip-of-tree
+baseline, blame and log links.
+* PrettyPatch/PrettyPatch.rb: Use GitHub instead of Subversion
+for tip-of-tree baseline.
+* code-review-test.html:
+
 2022-05-04  Jonathan Bedard  
 
 [bugs.webkit.org] Replace svn.webkit.org in committers autocomplete


Modified: trunk/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb (293991 => 293992)

--- trunk/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb	2022-05-09 23:02:39 UTC (rev 293991)
+++ trunk/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb	2022-05-09 23:03:48 UTC (rev 293992)
@@ -18,18 +18,6 @@
 string = normalize_line_ending(string)
 str = "#{HEADER}\n"
 
-# Just look at the first line to see if it is an SVN revision number as added
-# by webkit-patch for git checkouts.
-$svn_revision = 0
-string.each_line do |line|
-match = /^Subversion\ Revision: (\d*)$/.match(line)
-unless match.nil?
-str << "#{match[1]}\n"
-$svn_revision = match[1].to_i;
-end
-break
-end
-
 fileDiffs = FileDiff.parse(string)
 
 # Newly added images get two diffs with svn 1.7; toss the first one.
@@ -101,7 +89,7 @@
 
 SMALLEST_EQUAL_OPERATION = 3
 
-OPENSOURCE_TRAC_URL = "http://trac.webkit.org/"
+OPENSOURCE_GITHUB_URL = "https://github.com/WebKit/WebKit/blob/"
 
 OPENSOURCE_DIRS = Set.new %w[
 Examples
@@ -148,32 +136,11 @@
 end
 end
 
-def self.find_url_and_path(file_path)
-# Search file_path from the bottom up, at each level checking whether
-# we've found a directory we know exists in the source tree.
-
-dirname, basename = File.split(file_path)
-dirname.split(/\//).reverse.inject(basename) do |path, directory|
-path = directory + "/" + path
-
-return [OPENSOURCE_TRAC_URL, path] if OPENSOURCE_DIRS.include?(directory)
-
-path
-end
-
-[nil, file_path]
+def self.linkifyFilename(filename)
+"#{filename}"
 end
 
-def self.linkifyFilename(filename, force)
-if force
-  "#{filename}"
-else
-  url, pathBeneathTrunk = find_url_and_path(filename)
-  url.nil? ? filename : "#{filename}"
-end
-end
 
-
 HEADER =< 
 
@@ -725,7 +692,7 @@
 
 raise "no binary chunks" unless chunks
 
-from_filepath = FileDiff.extract_contents_of_from_revision(@filename, chunks[0], @git_indexes[0])
+from_filepath = FileDiff.extract_contents_from_remote(@filename, chunks[0], @git_indexes[0])
 to_filepath = FileDiff.extract_contents_of_to_revision(@filename, chunks[1], @git_indexes[1], from_filepath, @git_indexes[0])
 filepaths = from_filepath, to_filepath
 
@@ -763,9 +730,9 @@
 if @renameFrom
 str += "#{@filename}"
 str += "was renamed from"
-str += "#{PrettyPatch.linkifyFilename(@renameFrom.to_s, true)}"
+str += "#{PrettyPatch.linkifyFilename(@renameFrom.to_s)}"
 else
-str += "#{PrettyPatch.linkifyFilename(@filename, false)}\n"
+str += "#{PrettyPatch.linkifyFilename(@filename)}\n"
 end
 if @image then
 str += self.image_to_html
@@ -862,8 +829,8 @@
 END
 end
 
-def self.get_svn_uri(repository_path)
-"http://svn.webkit.org/repository/webkit/!svn/bc/" + $svn_revision.to_s + "/trunk/" + (repository_path)

[webkit-changes] [293986] trunk/Tools

2022-05-09 Thread jbedard
Title: [293986] trunk/Tools








Revision 293986
Author jbed...@apple.com
Date 2022-05-09 13:04:36 -0700 (Mon, 09 May 2022)


Log Message
[git-webkit] Verify forks after creation
https://bugs.webkit.org/show_bug.cgi?id=240085


Reviewed by Stephanie Lewis.

* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py:
(Setup.github): Check parent of fork, wait until fork is created before continuing.

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

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py




Diff

Modified: trunk/Tools/ChangeLog (293985 => 293986)

--- trunk/Tools/ChangeLog	2022-05-09 19:40:08 UTC (rev 293985)
+++ trunk/Tools/ChangeLog	2022-05-09 20:04:36 UTC (rev 293986)
@@ -1,3 +1,16 @@
+2022-05-09  Jonathan Bedard  
+
+[git-webkit] Verify forks after creation
+https://bugs.webkit.org/show_bug.cgi?id=240085
+
+
+Reviewed by Stephanie Lewis.
+
+* Scripts/libraries/webkitscmpy/setup.py: Bump version.
+* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
+* Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py:
+(Setup.github): Check parent of fork, wait until fork is created before continuing.
+
 2022-05-06  Keith Miller  
 
 Test262 runner should show progress


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (293985 => 293986)

--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-05-09 19:40:08 UTC (rev 293985)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-05-09 20:04:36 UTC (rev 293986)
@@ -29,7 +29,7 @@
 
 setup(
 name='webkitscmpy',
-version='4.13.1',
+version='4.13.2',
 description='Library designed to interact with git and svn repositories.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (293985 => 293986)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-05-09 19:40:08 UTC (rev 293985)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-05-09 20:04:36 UTC (rev 293986)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(4, 13, 1)
+version = Version(4, 13, 2)
 
 AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
 AutoInstall.register(Package('jinja2', Version(2, 11, 3)))


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py (293985 => 293986)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py	2022-05-09 19:40:08 UTC (rev 293985)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py	2022-05-09 20:04:36 UTC (rev 293986)
@@ -24,6 +24,7 @@
 import os
 import requests
 import sys
+import time
 
 from .command import Command
 from requests.auth import HTTPBasicAuth
@@ -54,9 +55,12 @@
 username,
 forked_name,
 ), auth=auth, headers=dict(Accept='application/vnd.github.v3+json'))
+
 if response.status_code == 200:
-log.info("User already owns a fork of '{}'!".format(repository.name))
-return result
+parent_name = response.json().get('parent', {}).get('full_name', None)
+if parent_name == '{}/{}'.format(repository.owner, repository.name):
+log.info("User already owns a fork of '{}'!".format(parent_name))
+return result
 
 if repository.owner == username or args.defaults or Terminal.choose(
 "Create a private fork of '{}' belonging to '{}'".format(forked_name, username),
@@ -91,6 +95,26 @@
 sys.stderr.write("Fork created with name '{}' belonging to '{}'\n Failed to change name to {}\n".format(set_name, username, forked_name))
 return 1
 
+response = None
+attempts = 0
+while response and response.status_code != 200:
+if attempts > 3:
+sys.stderr.write("Waiting on '{}' belonging to '{}' took to long\n".format(forked_name, username))
+sys.stderr.write("Wait until '{}/{}/{}' is accessible and then re-run setup\n".format(
+'/'.join(repository.url.split('/')[:3]),
+username, forked_name,
+))
+return 1
+if response:
+log.warning("Waiting for '{}' belonging to '{}'...".format(forked_name, username))
+time.sleep(10)
+attempts += 1
+response = requests.get('{}/repos/{}/{}'.format(
+repository.api_url,
+username,
+forked_name,
+

[webkit-changes] [293930] trunk/Tools

2022-05-06 Thread jbedard
Title: [293930] trunk/Tools








Revision 293930
Author jbed...@apple.com
Date 2022-05-06 16:17:18 -0700 (Fri, 06 May 2022)


Log Message
[git-webkit] Forward environment to `git commit`
https://bugs.webkit.org/show_bug.cgi?id=240191


Reviewed by Stephanie Lewis.

* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:
(PullRequest.create_commit): Pass caller's environment.

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

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py




Diff

Modified: trunk/Tools/ChangeLog (293929 => 293930)

--- trunk/Tools/ChangeLog	2022-05-06 23:10:39 UTC (rev 293929)
+++ trunk/Tools/ChangeLog	2022-05-06 23:17:18 UTC (rev 293930)
@@ -1,3 +1,15 @@
+2022-05-06  Jonathan Bedard  
+
+[git-webkit] Forward environment to `git commit`
+https://bugs.webkit.org/show_bug.cgi?id=240191
+
+Reviewed by Stephanie Lewis.
+
+* Scripts/libraries/webkitscmpy/setup.py: Bump version.
+* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
+* Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:
+(PullRequest.create_commit): Pass caller's environment.
+
 2022-05-06  Justin Michaud  
 
 Update PGO profile collection scripts to include MotionMark


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (293929 => 293930)

--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-05-06 23:10:39 UTC (rev 293929)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-05-06 23:17:18 UTC (rev 293930)
@@ -29,7 +29,7 @@
 
 setup(
 name='webkitscmpy',
-version='4.13.0',
+version='4.13.1',
 description='Library designed to interact with git and svn repositories.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (293929 => 293930)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-05-06 23:10:39 UTC (rev 293929)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-05-06 23:17:18 UTC (rev 293930)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(4, 13, 0)
+version = Version(4, 13, 1)
 
 AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
 AutoInstall.register(Package('jinja2', Version(2, 11, 3)))


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py (293929 => 293930)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py	2022-05-06 23:10:39 UTC (rev 293929)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py	2022-05-06 23:17:18 UTC (rev 293930)
@@ -118,13 +118,13 @@
 sys.stderr.write('No modified files\n')
 return 1
 log.info('Amending commit...' if will_amend else 'Creating commit...')
+env = os.environ
+env['COMMIT_MESSAGE_TITLE'] = getattr(args, '_title', None) or ''
+env['COMMIT_MESSAGE_BUG'] = bug_urls
 if run(
 [repository.executable(), 'commit', '--date=now'] + (['--amend'] if will_amend else []),
 cwd=repository.root_path,
-env=dict(
-COMMIT_MESSAGE_TITLE=getattr(args, '_title', None) or '',
-COMMIT_MESSAGE_BUG=bug_urls,
-),
+env=env,
 ).returncode:
 sys.stderr.write('Failed to generate commit\n')
 return 1






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [293891] trunk/Tools

2022-05-06 Thread jbedard
Title: [293891] trunk/Tools








Revision 293891
Author jbed...@apple.com
Date 2022-05-06 08:21:16 -0700 (Fri, 06 May 2022)


Log Message
[ews-build.webkit.org] Do not block EWS queues for merging-blocked label
https://bugs.webkit.org/show_bug.cgi?id=240169


Reviewed by Aakash Jain.

* Tools/CISupport/ews-build/steps.py:
(ValidateChange.validate_github): merging-blocked label should only block merge-queue.
* Tools/CISupport/ews-build/steps_unittest.py:

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

Modified Paths

trunk/Tools/CISupport/ews-build/steps.py
trunk/Tools/CISupport/ews-build/steps_unittest.py
trunk/Tools/ChangeLog




Diff

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

--- trunk/Tools/CISupport/ews-build/steps.py	2022-05-06 15:13:36 UTC (rev 293890)
+++ trunk/Tools/CISupport/ews-build/steps.py	2022-05-06 15:21:16 UTC (rev 293891)
@@ -1505,7 +1505,7 @@
 self.skip_build('Hash {} on PR {} is outdated'.format(self.getProperty('github.head.sha', '?')[:HASH_LENGTH_TO_DISPLAY], pr_number))
 return False
 
-blocked = self._is_pr_blocked(pr_json) if self.verifyReviewDenied else 0
+blocked = self._is_pr_blocked(pr_json) if self.verifyMergeQueue else 0
 if blocked == 1:
 self.skip_build("PR {} has been marked as '{}'".format(pr_number, self.BLOCKED_LABEL))
 return False


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

--- trunk/Tools/CISupport/ews-build/steps_unittest.py	2022-05-06 15:13:36 UTC (rev 293890)
+++ trunk/Tools/CISupport/ews-build/steps_unittest.py	2022-05-06 15:21:16 UTC (rev 293891)
@@ -5123,6 +5123,17 @@
 self.assertEqual(self.getProperty('fast_commit_queue'), None, 'fast_commit_queue is unexpectedly set')
 return rc
 
+def test_success_pr_blocked(self):
+self.setupStep(ValidateChange(verifyBugClosed=False))
+ValidateChange.get_pr_json = lambda x, pull_request, repository_url=None, retry=None: self.get_pr(pr_number=pull_request, labels=['merging-blocked'])
+self.setProperty('github.number', '1234')
+self.setProperty('repository', 'https://github.com/WebKit/WebKit')
+self.setProperty('github.head.sha', '7496f8ecc4cc8011f19c8cc1bc7b18fe4a88ad5c')
+self.expectOutcome(result=SUCCESS, state_string='Validated change')
+rc = self.runStep()
+self.assertEqual(self.getProperty('fast_commit_queue'), None, 'fast_commit_queue is unexpectedly set')
+return rc
+
 def test_obsolete_patch(self):
 self.setupStep(ValidateChange(verifyBugClosed=False))
 ValidateChange.get_patch_json = lambda x, patch_id: self.get_patch(obsolete=1)
@@ -5165,6 +5176,17 @@
 self.assertEqual(self.getProperty('fast_commit_queue'), None, 'fast_commit_queue is unexpectedly set')
 return rc
 
+def test_merge_queue_blocked(self):
+self.setupStep(ValidateChange(verifyMergeQueue=True))
+ValidateChange.get_pr_json = lambda x, pull_request, repository_url=None, retry=None: self.get_pr(pr_number=pull_request, labels=['merge-queue', 'merging-blocked'])
+self.setProperty('github.number', '1234')
+self.setProperty('repository', 'https://github.com/WebKit/WebKit')
+self.setProperty('github.head.sha', '7496f8ecc4cc8011f19c8cc1bc7b18fe4a88ad5c')
+self.expectOutcome(result=FAILURE, state_string="PR 1234 has been marked as 'merging-blocked'")
+rc = self.runStep()
+self.assertEqual(self.getProperty('fast_commit_queue'), None, 'fast_commit_queue is unexpectedly set')
+return rc
+
 def test_no_merge_queue(self):
 self.setupStep(ValidateChange(verifyMergeQueue=True))
 ValidateChange.get_pr_json = lambda x, pull_request, repository_url=None, retry=None: self.get_pr(pr_number=pull_request)


Modified: trunk/Tools/ChangeLog (293890 => 293891)

--- trunk/Tools/ChangeLog	2022-05-06 15:13:36 UTC (rev 293890)
+++ trunk/Tools/ChangeLog	2022-05-06 15:21:16 UTC (rev 293891)
@@ -1,3 +1,15 @@
+2022-05-06  Jonathan Bedard  
+
+[ews-build.webkit.org] Do not block EWS queues for merging-blocked label
+https://bugs.webkit.org/show_bug.cgi?id=240169
+
+
+Reviewed by Aakash Jain.
+
+* CISupport/ews-build/steps.py:
+(ValidateChange.validate_github): merging-blocked label should only block merge-queue.
+* CISupport/ews-build/steps_unittest.py:
+
 2022-05-06  Philippe Normand  
 
 [Flatpak SDK] Include port / build type in shell prompt






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [293875] trunk/Tools

2022-05-05 Thread jbedard
Title: [293875] trunk/Tools








Revision 293875
Author jbed...@apple.com
Date 2022-05-05 17:49:04 -0700 (Thu, 05 May 2022)


Log Message
[git-webkit] Automatically file bug
https://bugs.webkit.org/show_bug.cgi?id=240139


Reviewed by Dewei Zhu.

* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py:
(Branch.main): If a project has defined bug trackers and the user provides a bug title instead of a bug
url or branch name (determined by spaces in the provided string), walk the user through bug creation.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/branch_unittest.py:
(TestBranch): Add mock issues, rebase prompts.
(TestBranch.test_create_bug): Added.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/revert_unittest.py:
(TestRevert.test_github): Add mock issues, rebase prompts.
(TestRevert.test_modified): Ditto.

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

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/branch_unittest.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/revert_unittest.py




Diff

Modified: trunk/Tools/ChangeLog (293874 => 293875)

--- trunk/Tools/ChangeLog	2022-05-06 00:24:01 UTC (rev 293874)
+++ trunk/Tools/ChangeLog	2022-05-06 00:49:04 UTC (rev 293875)
@@ -1,3 +1,24 @@
+2022-05-05  Jonathan Bedard  
+
+[git-webkit] Automatically file bug
+https://bugs.webkit.org/show_bug.cgi?id=240139
+
+
+Reviewed by Dewei Zhu.
+
+* Scripts/libraries/webkitscmpy/setup.py: Bump version.
+* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
+* Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py:
+(Branch.main): If a project has defined bug trackers and the user provides a bug title instead of a bug
+url or branch name (determined by spaces in the provided string), walk the user through bug creation.
+* Scripts/libraries/webkitscmpy/webkitscmpy/test/branch_unittest.py:
+(TestBranch): Add mock issues, rebase prompts.
+(TestBranch.test_create_bug): Added.
+* Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:
+* Scripts/libraries/webkitscmpy/webkitscmpy/test/revert_unittest.py:
+(TestRevert.test_github): Add mock issues, rebase prompts.
+(TestRevert.test_modified): Ditto.
+
 2022-05-05  Sihui Liu  
 
 SuspendableWorkQueue::suspend should invoke callback immediately when queue is suspended


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (293874 => 293875)

--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-05-06 00:24:01 UTC (rev 293874)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-05-06 00:49:04 UTC (rev 293875)
@@ -29,7 +29,7 @@
 
 setup(
 name='webkitscmpy',
-version='4.12.4',
+version='4.13.0',
 description='Library designed to interact with git and svn repositories.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (293874 => 293875)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-05-06 00:24:01 UTC (rev 293874)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-05-06 00:49:04 UTC (rev 293875)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(4, 12, 4)
+version = Version(4, 13, 0)
 
 AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
 AutoInstall.register(Package('jinja2', Version(2, 11, 3)))


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py (293874 => 293875)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py	2022-05-06 00:24:01 UTC (rev 293874)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py	2022-05-06 00:49:04 UTC (rev 293875)
@@ -98,7 +98,11 @@
 return 1
 
 if not args.issue:
-args.issue = Terminal.input('{}nter name of new branch (or bug URL): '.format('{}, e'.format(why) if why else 'E'))
+if Tracker.instance():
+prompt = '{}nter issue URL or title of new issue: '.format('{}, e'.format(why) if why else 'E')
+else:
+prompt = '{}nter name of new branch (or issue URL): '.format('{}, e'.format(why) if why else 'E')
+args.issue = Terminal.input(prompt)
 
 if 

[webkit-changes] [293849] trunk/Websites/bugs.webkit.org

2022-05-05 Thread jbedard
Title: [293849] trunk/Websites/bugs.webkit.org








Revision 293849
Author jbed...@apple.com
Date 2022-05-05 11:31:57 -0700 (Thu, 05 May 2022)


Log Message
[bugs.webkit.org] Replace svn.webkit.org in committers autocomplete
https://bugs.webkit.org/show_bug.cgi?id=240090


Reviewed by Aakash Jain.

* Websites/bugs.webkit.org/committers-autocomplete.js: Replace
svn.webkit.org with raw.githubusercontent.com.

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

Modified Paths

trunk/Websites/bugs.webkit.org/ChangeLog
trunk/Websites/bugs.webkit.org/committers-autocomplete.js




Diff

Modified: trunk/Websites/bugs.webkit.org/ChangeLog (293848 => 293849)

--- trunk/Websites/bugs.webkit.org/ChangeLog	2022-05-05 18:28:40 UTC (rev 293848)
+++ trunk/Websites/bugs.webkit.org/ChangeLog	2022-05-05 18:31:57 UTC (rev 293849)
@@ -1,3 +1,13 @@
+2022-05-04  Jonathan Bedard  
+
+[bugs.webkit.org] Replace svn.webkit.org in committers autocomplete
+https://bugs.webkit.org/show_bug.cgi?id=240090
+
+
+Reviewed by Aakash Jain.
+
+* committers-autocomplete.js: Replace svn.webkit.org with raw.githubusercontent.com.
+
 2022-03-31  Myles C. Maxfield  
 
 [Bugzilla] Code reviews show non-ASCII characters in patches as garbage


Modified: trunk/Websites/bugs.webkit.org/committers-autocomplete.js (293848 => 293849)

--- trunk/Websites/bugs.webkit.org/committers-autocomplete.js	2022-05-05 18:28:40 UTC (rev 293848)
+++ trunk/Websites/bugs.webkit.org/committers-autocomplete.js	2022-05-05 18:31:57 UTC (rev 293849)
@@ -24,7 +24,7 @@
 // DAMAGE.
 
 WebKitCommitters = (function() {
-var COMMITTERS_URL = 'https://svn.webkit.org/repository/webkit/trunk/metadata/contributors.json';
+var COMMITTERS_URL = 'https://raw.githubusercontent.com/WebKit/WebKit/main/metadata/contributors.json';
 var m_committers;
 
 function statusToType(status) {






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [293832] trunk/Tools

2022-05-05 Thread jbedard
Title: [293832] trunk/Tools








Revision 293832
Author jbed...@apple.com
Date 2022-05-05 08:04:50 -0700 (Thu, 05 May 2022)


Log Message
[webkitbugspy] Include mocks in package
https://bugs.webkit.org/show_bug.cgi?id=240098


Reviewed by Aakash Jain.

* Scripts/libraries/webkitbugspy/setup.py:
* Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py:

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

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitbugspy/setup.py
trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py




Diff

Modified: trunk/Tools/ChangeLog (293831 => 293832)

--- trunk/Tools/ChangeLog	2022-05-05 15:01:54 UTC (rev 293831)
+++ trunk/Tools/ChangeLog	2022-05-05 15:04:50 UTC (rev 293832)
@@ -1,3 +1,14 @@
+2022-05-04  Jonathan Bedard  
+
+[webkitbugspy] Include mocks in package
+https://bugs.webkit.org/show_bug.cgi?id=240098
+
+
+Reviewed by Aakash Jain.
+
+* Scripts/libraries/webkitbugspy/setup.py:
+* Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py:
+
 2022-05-05  Jonathan Bedard  
 
 [git-webkit] Fetch alternate remotes when adding remote


Modified: trunk/Tools/Scripts/libraries/webkitbugspy/setup.py (293831 => 293832)

--- trunk/Tools/Scripts/libraries/webkitbugspy/setup.py	2022-05-05 15:01:54 UTC (rev 293831)
+++ trunk/Tools/Scripts/libraries/webkitbugspy/setup.py	2022-05-05 15:04:50 UTC (rev 293832)
@@ -30,7 +30,7 @@
 
 setup(
 name='webkitbugspy',
-version='0.5.4',
+version='0.6.0',
 description='Library containing a shared API for various bug trackers.',
 long_description=readme(),
 classifiers=[
@@ -49,6 +49,8 @@
 license='Modified BSD',
 packages=[
 'webkitbugspy',
+'webkitbugspy.mocks',
+'webkitbugspy.tests',
 ],
 install_requires=[
 'webkitcorepy',


Modified: trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py (293831 => 293832)

--- trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py	2022-05-05 15:01:54 UTC (rev 293831)
+++ trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py	2022-05-05 15:04:50 UTC (rev 293832)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(0, 5, 4)
+version = Version(0, 6, 0)
 
 from .user import User
 from .issue import Issue






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [293831] trunk/Tools

2022-05-05 Thread jbedard
Title: [293831] trunk/Tools








Revision 293831
Author jbed...@apple.com
Date 2022-05-05 08:01:54 -0700 (Thu, 05 May 2022)


Log Message
[git-webkit] Fetch alternate remotes when adding remote
https://bugs.webkit.org/show_bug.cgi?id=240066


Reviewed by Ryan Haddad.

* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto,
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py: Mock `git fetch`
for non-fork remotes.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py:
(Setup._add_remote): Optionally fetch remote after adding it.
(Setup.git):

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

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py




Diff

Modified: trunk/Tools/ChangeLog (293830 => 293831)

--- trunk/Tools/ChangeLog	2022-05-05 14:45:07 UTC (rev 293830)
+++ trunk/Tools/ChangeLog	2022-05-05 15:01:54 UTC (rev 293831)
@@ -1,3 +1,19 @@
+2022-05-05  Jonathan Bedard  
+
+[git-webkit] Fetch alternate remotes when adding remote
+https://bugs.webkit.org/show_bug.cgi?id=240066
+
+
+Reviewed by Ryan Haddad.
+
+* Scripts/libraries/webkitscmpy/setup.py: Bump version.
+* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto,
+* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py: Mock `git fetch`
+for non-fork remotes.
+* Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py:
+(Setup._add_remote): Optionally fetch remote after adding it.
+(Setup.git):
+
 2022-05-04  Chris Dumez  
 
 REGRESSION(r293703):[ BigSur+ iOS ] TestWTF.WTF_URLExtras.URLExtras_ParsingError (API-Test) is a constant failure


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (293830 => 293831)

--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-05-05 14:45:07 UTC (rev 293830)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-05-05 15:01:54 UTC (rev 293831)
@@ -29,7 +29,7 @@
 
 setup(
 name='webkitscmpy',
-version='4.12.3',
+version='4.12.4',
 description='Library designed to interact with git and svn repositories.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (293830 => 293831)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-05-05 14:45:07 UTC (rev 293830)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-05-05 15:01:54 UTC (rev 293831)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(4, 12, 3)
+version = Version(4, 12, 4)
 
 AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
 AutoInstall.register(Package('jinja2', Version(2, 11, 3)))


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py (293830 => 293831)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py	2022-05-05 14:45:07 UTC (rev 293830)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py	2022-05-05 15:01:54 UTC (rev 293831)
@@ -1,4 +1,4 @@
-# Copyright (C) 2020, 2021 Apple Inc. All rights reserved.
+# Copyright (C) 2020-2022 Apple Inc. All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
@@ -449,7 +449,7 @@
 generator=lambda *args, **kwargs:
 self.edit_config(args[2], args[3]),
 ), mocks.Subprocess.Route(
-self.executable, 'fetch', 'fork',
+self.executable, 'fetch', re.compile(r'.+'),
 cwd=self.path,
 completion=mocks.ProcessCompletion(
 returncode=0,


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py (293830 => 293831)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py	2022-05-05 14:45:07 UTC (rev 293830)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py	2022-05-05 15:01:54 UTC (rev 293831)
@@ -95,7 +95,7 @@
 return result
 
 @classmethod
-def _add_remote(cls, repository, name, url):
+def _add_remote(cls, repository, name, url, fetch=True):
 returncode = run(
 [repository.executable(), 'remote', 'add', name, url],
 capture_output=True, cwd=repository.root_path,
@@ -110,6 +110,18 @@
 return 1
 
 log.info("Added remote '{}'".format(name))
+
+if not fetch:
+return 0
+
+returncode = run(
+[repository.executable(), 'fetch', 

[webkit-changes] [293806] trunk/metadata/contributors.json

2022-05-04 Thread jbedard
Title: [293806] trunk/metadata/contributors.json








Revision 293806
Author jbed...@apple.com
Date 2022-05-04 17:20:52 -0700 (Wed, 04 May 2022)


Log Message
Add myself (Youssef Soliman) to contributors.json
https://bugs.webkit.org/show_bug.cgi?id=240084

Reviewed by Jer Noble.

* metadata/contributors.json:

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

Modified Paths

trunk/metadata/contributors.json




Diff

Modified: trunk/metadata/contributors.json (293805 => 293806)

--- trunk/metadata/contributors.json	2022-05-05 00:11:30 UTC (rev 293805)
+++ trunk/metadata/contributors.json	2022-05-05 00:20:52 UTC (rev 293806)
@@ -7008,6 +7008,18 @@
},
{
   "emails" : [
+ "y_soli...@apple.com",
+ "youssefdevel...@gmail.com"
+  ],
+  "github" : "youssefsoli",
+  "name" : "Youssef Soliman",
+  "nicks" : [
+ "ys",
+ "youssefsoli"
+  ]
+   },
+   {
+  "emails" : [
  "yousuke.kim...@sony.com"
   ],
   "github" : "ykimot",






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [293784] trunk/Tools

2022-05-04 Thread jbedard
Title: [293784] trunk/Tools








Revision 293784
Author jbed...@apple.com
Date 2022-05-04 13:20:24 -0700 (Wed, 04 May 2022)


Log Message
[git-webkit] Populate commit message with bug details
https://bugs.webkit.org/show_bug.cgi?id=240022


Reviewed by Dewei Zhu.

* Tools/Scripts/hooks/prepare-commit-msg: Pull title and bugs from environment variables.
* Tools/Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/mocks/popen.py:
(PopenBase.__init__): Support environment variables.
(PopenBase.poll): Ditto.
(Popen.__init__): Ditto.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/mocks/subprocess.py:
(Subprocess.CommandRoute.__init__): Support environment variables.
(Subprocess.CommandRoute.matches): Ditto
(Subprocess.CommandRoute.__call__): Ditto.
* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py: Pull title and bugs from
environment variables.
(Branch.main): Pass bug title and URLs to caller via args.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:
(PullRequest.create_commit): Pass title and bug urls to `git commit`.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:

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

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/hooks/prepare-commit-msg
trunk/Tools/Scripts/libraries/webkitcorepy/setup.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/mocks/popen.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/mocks/subprocess.py
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py




Diff

Modified: trunk/Tools/ChangeLog (293783 => 293784)

--- trunk/Tools/ChangeLog	2022-05-04 19:20:58 UTC (rev 293783)
+++ trunk/Tools/ChangeLog	2022-05-04 20:20:24 UTC (rev 293784)
@@ -1,3 +1,32 @@
+2022-05-04  Jonathan Bedard  
+
+[git-webkit] Populate commit message with bug details
+https://bugs.webkit.org/show_bug.cgi?id=240022
+
+
+Reviewed by Dewei Zhu.
+
+* Scripts/hooks/prepare-commit-msg: Pull title and bugs from environment variables.
+* Scripts/libraries/webkitcorepy/setup.py: Bump version.
+* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
+* Scripts/libraries/webkitcorepy/webkitcorepy/mocks/popen.py:
+(PopenBase.__init__): Support environment variables.
+(PopenBase.poll): Ditto.
+(Popen.__init__): Ditto.
+* Scripts/libraries/webkitcorepy/webkitcorepy/mocks/subprocess.py:
+(Subprocess.CommandRoute.__init__): Support environment variables.
+(Subprocess.CommandRoute.matches): Ditto
+(Subprocess.CommandRoute.__call__): Ditto.
+* Scripts/libraries/webkitscmpy/setup.py: Bump version.
+* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
+* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
+* Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py: Pull title and bugs from
+environment variables.
+(Branch.main): Pass bug title and URLs to caller via args.
+* Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:
+(PullRequest.create_commit): Pass title and bug urls to `git commit`.
+* Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:
+
 2022-05-03  Robert Jenner  
 
 REGRESSION(r287574-r287580): [ iOS ] 3 TestWebKitAPI.WebKitLegacy.* tests are constantly crashing (ScrollingDoesNotPauseMedia, PreemptVideoFullscreen, AudioSessionCategoryIOS)


Modified: trunk/Tools/Scripts/hooks/prepare-commit-msg (293783 => 293784)

--- trunk/Tools/Scripts/hooks/prepare-commit-msg	2022-05-04 19:20:58 UTC (rev 293783)
+++ trunk/Tools/Scripts/hooks/prepare-commit-msg	2022-05-04 20:20:24 UTC (rev 293784)
@@ -58,13 +58,17 @@
 dirname = line.split(':')[0]
 continue
 
-return '''Need a short description (OOPS!).
-Need the bug URL (OOPS!).
+return '''{title}
+{bugs}
 
 Reviewed by NOBODY (OOPS!).
 
-{}
-'''.format('\n'.join(commit_message))
+{content}
+'''.format(
+title=os.environ.get('COMMIT_MESSAGE_TITLE', '') or 'Need a short description (OOPS!).',
+bugs=os.environ.get('COMMIT_MESSAGE_BUG', '') or 

[webkit-changes] [293780] trunk/Tools

2022-05-04 Thread jbedard
Title: [293780] trunk/Tools








Revision 293780
Author jbed...@apple.com
Date 2022-05-04 10:47:23 -0700 (Wed, 04 May 2022)


Log Message
[ews.webkit.org] Hide sensitive content for alternate remotes
https://bugs.webkit.org/show_bug.cgi?id=239988


Reviewed by Aakash Jain.

* CISupport/ews-build/steps.py:
(ConfigureBuild.add_pr_details): PRs targeting alternate hosts are sensitive.
(DetermineLandedIdentifier.start): Hide step for sensitive PRs.
(AddReviewerToChangeLog.hideStepIf): Ditto.
(ValidateCommitMessage): Implement with steps.ShellSequence
(ValidateCommitMessage.__init__):
(ValidateCommitMessage.run): Use grep to search for appropriate commit message string and hide
the content of the commit message itself.
(ValidateCommitMessage.start): Logic moved to ValidateCommitMessage.run.
(ValidateCommitMessage.evaluateCommand): Ditto.
* CISupport/ews-build/steps_unittest.py:

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

Modified Paths

trunk/Tools/CISupport/ews-build/steps.py
trunk/Tools/CISupport/ews-build/steps_unittest.py
trunk/Tools/ChangeLog




Diff

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

--- trunk/Tools/CISupport/ews-build/steps.py	2022-05-04 17:44:44 UTC (rev 293779)
+++ trunk/Tools/CISupport/ews-build/steps.py	2022-05-04 17:47:23 UTC (rev 293780)
@@ -549,6 +549,9 @@
 owners = self.getProperty('owners', [])
 revision = self.getProperty('github.head.sha')
 
+if self.getProperty('project') != 'WebKit/WebKit':
+self.setProperty('sensitive', True)
+
 self.setProperty('change_id', revision[:HASH_LENGTH_TO_DISPLAY], 'ConfigureBuild')
 
 title = f': {title}' if title else ''
@@ -4688,7 +4691,10 @@
 comment += f'\n\nReviewed commits have been landed. Closing PR #{pr_number} and removing active labels.'
 return comment
 
+def hideStepIf(self, results, step):
+return self.getProperty('sensitive', False)
 
+
 class CheckPatchStatusOnEWSQueues(buildstep.BuildStep, BugzillaMixin):
 name = 'check-status-on-other-ewses'
 descriptionDone = ['Checked patch status on other queues']
@@ -4965,14 +4971,14 @@
 return self.getProperty('github.number') and self.getProperty('reviewers_full_names')
 
 def hideStepIf(self, results, step):
-return not self.doStepIf(step)
+return not self.doStepIf(step) or self.getProperty('sensitive', False)
 
 
-class ValidateCommitMessage(shell.ShellCommand):
+class ValidateCommitMessage(steps.ShellSequence, ShellMixin):
 name = 'validate-commit-message'
 haltOnFailure = False
 flunkOnFailure = True
-OOPS_RE = re.compile(r'\(OO*PP*S!\)')
+OOPS_RE = 'OO*PP*S!'
 REVIEWED_STRINGS = (
 'Reviewed by',
 'Unreviewed',
@@ -4982,38 +4988,38 @@
 
 def __init__(self, **kwargs):
 super(ValidateCommitMessage, self).__init__(logEnviron=False, timeout=60, **kwargs)
-self.summary = 'Patches have no commit message'
 
-def start(self, BufferLogObserverClass=logobserver.BufferLogObserver):
+@defer.inlineCallbacks
+def run(self, BufferLogObserverClass=logobserver.BufferLogObserver):
 base_ref = self.getProperty('github.base.ref', DEFAULT_BRANCH)
 head_ref = self.getProperty('github.head.ref', DEFAULT_BRANCH)
-self.command = ['git', 'log', head_ref, f'^{base_ref}']
 
+self.commands = []
+commands = [
+f"git log {head_ref} ^{base_ref} | grep -q '{self.OOPS_RE}' && echo 'Commit message contains (OOPS!)' || test $? -eq 1",
+"git log {} ^{} | grep -q '\\({}\\)' || echo 'No reviewer information in commit message'".format(
+head_ref, base_ref,
+'\\|'.join(self.REVIEWED_STRINGS),
+),
+]
+for command in commands:
+self.commands.append(util.ShellArg(command=self.shell_command(command), logname='stdio', haltOnFailure=True))
+
 self.log_observer = BufferLogObserverClass(wantStderr=True)
 self.addLogObserver('stdio', self.log_observer)
 
-return super(ValidateCommitMessage, self).start()
+rc = yield super(ValidateCommitMessage, self).run()
 
-def getResultSummary(self):
-if self.results in (SUCCESS, FAILURE):
-return {'step': self.summary}
-return super(ValidateCommitMessage, self).getResultSummary()
-
-def evaluateCommand(self, cmd):
-rc = super(ValidateCommitMessage, self).evaluateCommand(cmd)
 if rc == SKIPPED:
+self.summary = 'Patches have no commit message'
 return rc
 
-if rc == SUCCESS:
+log_text = self.log_observer.getStdout().rstrip()
+if log_text:
+self.summary = log_text
+rc = FAILURE
+elif rc == SUCCESS:
 self.summary = 'Validated commit message'
-log_text = self.log_observer.getStdout()
-if self.OOPS_RE.search(log_text):
-

[webkit-changes] [293774] trunk/Tools

2022-05-04 Thread jbedard
Title: [293774] trunk/Tools








Revision 293774
Author jbed...@apple.com
Date 2022-05-04 08:25:22 -0700 (Wed, 04 May 2022)


Log Message
[ews-build.webkit.org] Cache contributors by default
https://bugs.webkit.org/show_bug.cgi?id=240040


Reviewed by Aakash Jain.

On-disk contributor record can get stale quickly. Rely on the network by default.

* Tools/CISupport/ews-build/steps.py:
(GitHub.email_for_owners): Rely on the network contributors.json by default.
(Contributors.load): Force reload contributors every 4 hours. Use disk or remote if specifically
requested, otherwise default to remote. Use cache if not expired.
(ValidateCommitterAndReviewer.start): Rely on the network contributors.json by default.
(AddReviewerMixin.gitCommitEnvironment): Ditto.
(AddAuthorToCommitMessage.author): Ditto.

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

Modified Paths

trunk/Tools/CISupport/ews-build/steps.py
trunk/Tools/CISupport/ews-build/steps_unittest.py
trunk/Tools/ChangeLog




Diff

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

--- trunk/Tools/CISupport/ews-build/steps.py	2022-05-04 14:48:29 UTC (rev 293773)
+++ trunk/Tools/CISupport/ews-build/steps.py	2022-05-04 15:25:22 UTC (rev 293774)
@@ -132,7 +132,7 @@
 def email_for_owners(cls, owners):
 if not owners:
 return None, 'No owners defined, so email cannot be extracted'
-contributors, errors = Contributors.load(use_network=False)
+contributors, errors = Contributors.load()
 return contributors.get(owners[0].lower(), {}).get('email'), errors
 
 
@@ -415,6 +415,8 @@
 class Contributors(object):
 url = ''
 contributors = {}
+last_update = 0
+REFRESH = 4 * 60 * 60
 
 @classmethod
 def load_from_disk(cls):
@@ -438,15 +440,32 @@
 return {}, 'Failed to access {url}\n'.format(url=""
 
 @classmethod
-def load(cls, use_network=True):
+def load(cls, use_network=None):
 errors = []
 
+now = int(time.time())
+if cls.last_update < now - cls.REFRESH:
+cls.contributors = {}
+
 if use_network:
+cls.contributors = {}
 contributors_json, error = cls.load_from_github()
 if error:
 errors.append(error)
+else:
+cls.last_update = now
+elif use_network is False:
+contributors_json, error = cls.load_from_disk()
+if error:
+errors.append(error)
+elif cls.contributors:
+return cls.contributors, errors
 else:
-contributors_json = []
+contributors_json, error = cls.load_from_github()
+if error:
+errors.append(error)
+else:
+cls.last_update = now
 
 if not contributors_json:
 contributors_json, error = cls.load_from_disk()
@@ -453,7 +472,6 @@
 if error:
 errors.append(error)
 
-contributors = {}
 for value in contributors_json:
 name = value.get('name')
 emails = value.get('emails')
@@ -460,14 +478,14 @@
 github_username = value.get('github')
 if name and emails:
 bugzilla_email = emails[0].lower()  # We're requiring that the first email is the primary bugzilla email
-contributors[bugzilla_email] = {'name': name, 'status': value.get('status')}
+cls.contributors[bugzilla_email] = {'name': name, 'status': value.get('status')}
 if github_username and name and emails:
-contributors[github_username.lower()] = dict(
+cls.contributors[github_username.lower()] = dict(
 name=name,
 status=value.get('status'),
 email=emails[0].lower(),
 )
-return contributors, errors
+return cls.contributors, errors
 
 
 class ConfigureBuild(buildstep.BuildStep, AddToLogMixin):
@@ -1553,7 +1571,7 @@
 return contributor.get('name')
 
 def start(self):
-self.contributors, errors = Contributors.load()
+self.contributors, errors = Contributors.load(use_network=True)
 for error in errors:
 print(error)
 self._addToLog('stdio', error)
@@ -4783,7 +4801,7 @@
 FILTER_BRANCH_SQUELCH_WARNING='1',
 )
 
-contributors, _ = Contributors.load(use_network=False)
+contributors, _ = Contributors.load()
 return dict(
 GIT_COMMITTER_NAME=contributors.get(owners[0].lower(), {}).get('name', 'EWS'),
 GIT_COMMITTER_EMAIL=contributors.get(owners[0].lower(), {}).get('email', FROM_EMAIL),
@@ -4846,15 +4864,16 @@
 super(AddAuthorToCommitMessage, self).__init__(logEnviron=False, timeout=60, **kwargs)
 
 def author(self):
-contributors, _ = Contributors.load(use_network=False)
+

[webkit-changes] [293667] trunk/Tools

2022-05-02 Thread jbedard
Title: [293667] trunk/Tools








Revision 293667
Author jbed...@apple.com
Date 2022-05-02 09:57:43 -0700 (Mon, 02 May 2022)


Log Message
[git-webkit] log should support ranges
https://bugs.webkit.org/show_bug.cgi?id=239510


Reviewed by Ryan Haddad.

* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py:
(FilteredCommand.replace): Break logic converting a substring into a revision or hash into a function.
(FilteredCommand.main): If an argument can be split by ..., convert it's substrings into revisions/hashes.

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

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py




Diff

Modified: trunk/Tools/ChangeLog (293666 => 293667)

--- trunk/Tools/ChangeLog	2022-05-02 16:52:55 UTC (rev 293666)
+++ trunk/Tools/ChangeLog	2022-05-02 16:57:43 UTC (rev 293667)
@@ -1,3 +1,17 @@
+2022-05-02  Jonathan Bedard  
+
+[git-webkit] log should support ranges
+https://bugs.webkit.org/show_bug.cgi?id=239510
+
+
+Reviewed by Ryan Haddad.
+
+* Scripts/libraries/webkitscmpy/setup.py: Bump version.
+* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
+* Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py:
+(FilteredCommand.replace): Break logic converting a substring into a revision or hash into a function.
+(FilteredCommand.main): If an argument can be split by ..., convert it's substrings into revisions/hashes.
+
 2022-05-02  Wenson Hsieh  
 
 [iOS] Add support for the "Markup Image" action when right clicking an image in editable content


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (293666 => 293667)

--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-05-02 16:52:55 UTC (rev 293666)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-05-02 16:57:43 UTC (rev 293667)
@@ -29,7 +29,7 @@
 
 setup(
 name='webkitscmpy',
-version='4.12.1',
+version='4.12.2',
 description='Library designed to interact with git and svn repositories.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (293666 => 293667)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-05-02 16:52:55 UTC (rev 293666)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-05-02 16:57:43 UTC (rev 293667)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(4, 12, 1)
+version = Version(4, 12, 2)
 
 AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
 AutoInstall.register(Package('jinja2', Version(2, 11, 3)))


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py (293666 => 293667)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py	2022-05-02 16:52:55 UTC (rev 293666)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py	2022-05-02 16:57:43 UTC (rev 293667)
@@ -146,6 +146,18 @@
 return FilteredCommand.main(args, repository, command=cls.name, **kwargs)
 
 @classmethod
+def replace(cls, arg, repository):
+parsed = Commit.parse(arg, do_assert=False)
+if not parsed:
+return None
+replacement = None
+if repository.is_svn:
+replacement = repository.cache.to_revision(hash=parsed.hash, identifier=str(parsed) if parsed.identifier else None)
+if repository.is_git:
+replacement = repository.cache.to_hash(revision=parsed.revision, identifier=str(parsed) if parsed.identifier else None)
+return replacement
+
+@classmethod
 def main(cls, args, repository, command=None, representation=None, **kwargs):
 if not repository:
 sys.stderr.write('No repository provided\n')
@@ -170,16 +182,16 @@
 return 1
 
 for index in range(len(args)):
-parsed = Commit.parse(args[index], do_assert=False)
-if parsed:
-replacement = None
-if repository.is_svn:
-replacement = repository.cache.to_revision(hash=parsed.hash, identifier=str(parsed) if parsed.identifier else None)
-if repository.is_git:
-replacement = repository.cache.to_hash(revision=parsed.revision, identifier=str(parsed) if parsed.identifier else None)
-if replacement:
-args[index] = replacement
+replacement = cls.replace(args[index], repository)
+if replacement:
+args[index] = replacement

[webkit-changes] [293615] trunk/Tools

2022-04-29 Thread jbedard
Title: [293615] trunk/Tools








Revision 293615
Author jbed...@apple.com
Date 2022-04-29 08:35:26 -0700 (Fri, 29 Apr 2022)


Log Message
[git-webkit] Redact bug title in branch name on alternate remotes
https://bugs.webkit.org/show_bug.cgi?id=239826


Rubber-stamped by Aakash Jain.

* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py:
(Branch.main): Allow caller to redact bug title in branch name.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:
(PullRequest.pull_request_branch_point): Redact bug title in branch name
for non-origin remotes.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/branch_unittest.py:
(TestBranch.test_redacted):

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

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/branch_unittest.py




Diff

Modified: trunk/Tools/ChangeLog (293614 => 293615)

--- trunk/Tools/ChangeLog	2022-04-29 15:24:12 UTC (rev 293614)
+++ trunk/Tools/ChangeLog	2022-04-29 15:35:26 UTC (rev 293615)
@@ -1,3 +1,21 @@
+2022-04-29  Jonathan Bedard  
+
+[git-webkit] Redact bug title in branch name on alternate remotes
+https://bugs.webkit.org/show_bug.cgi?id=239826
+
+
+Rubber-stamped by Aakash Jain.
+
+* Scripts/libraries/webkitscmpy/setup.py: Bump version.
+* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
+* Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py:
+(Branch.main): Allow caller to redact bug title in branch name.
+* Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:
+(PullRequest.pull_request_branch_point): Redact bug title in branch name
+for non-origin remotes.
+* Scripts/libraries/webkitscmpy/webkitscmpy/test/branch_unittest.py:
+(TestBranch.test_redacted):
+
 2022-04-27  Jonathan Bedard  
 
 [ews-build.webkit.org] Link to PRs with undefined title


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (293614 => 293615)

--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-04-29 15:24:12 UTC (rev 293614)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-04-29 15:35:26 UTC (rev 293615)
@@ -29,7 +29,7 @@
 
 setup(
 name='webkitscmpy',
-version='4.12.0',
+version='4.12.1',
 description='Library designed to interact with git and svn repositories.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (293614 => 293615)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-04-29 15:24:12 UTC (rev 293614)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-04-29 15:35:26 UTC (rev 293615)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(4, 12, 0)
+version = Version(4, 12, 1)
 
 AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
 AutoInstall.register(Package('jinja2', Version(2, 11, 3)))


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py (293614 => 293615)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py	2022-04-29 15:24:12 UTC (rev 293614)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py	2022-04-29 15:35:26 UTC (rev 293615)
@@ -92,7 +92,7 @@
 return string_utils.encode(result, target_type=str)
 
 @classmethod
-def main(cls, args, repository, why=None, **kwargs):
+def main(cls, args, repository, why=None, redact=False, **kwargs):
 if not isinstance(repository, local.Git):
 sys.stderr.write("Can only 'branch' on a native Git repository\n")
 return 1
@@ -100,14 +100,16 @@
 if not args.issue:
 args.issue = Terminal.input('{}nter name of new branch (or bug URL): '.format('{}, e'.format(why) if why else 'E'))
 
-if string_utils.decode(args.issue).isnumeric() and Tracker.instance():
+if string_utils.decode(args.issue).isnumeric() and Tracker.instance() and not redact:
 issue = Tracker.instance().issue(int(args.issue))
 if issue and issue.title:
 args.issue = cls.to_branch_name(issue.title)
 else:
 issue = Tracker.from_string(args.issue)
-if issue and issue.title:
+if issue and issue.title and not redact:
 args.issue = cls.to_branch_name(issue.title)
+elif issue:
+args.issue 

[webkit-changes] [293614] trunk/Tools

2022-04-29 Thread jbedard
Title: [293614] trunk/Tools








Revision 293614
Author jbed...@apple.com
Date 2022-04-29 08:24:12 -0700 (Fri, 29 Apr 2022)


Log Message
[ews-build.webkit.org] Link to PRs with undefined title
https://bugs.webkit.org/show_bug.cgi?id=239820


Reviewed by Aakash Jain.

* CISupport/ews-build/steps.py:
(ConfigureBuild.add_pr_details):

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

Modified Paths

trunk/Tools/CISupport/ews-build/steps.py
trunk/Tools/ChangeLog




Diff

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

--- trunk/Tools/CISupport/ews-build/steps.py	2022-04-29 15:11:40 UTC (rev 293613)
+++ trunk/Tools/CISupport/ews-build/steps.py	2022-04-29 15:24:12 UTC (rev 293614)
@@ -533,8 +533,8 @@
 
 self.setProperty('change_id', revision[:HASH_LENGTH_TO_DISPLAY], 'ConfigureBuild')
 
-if title:
-self.addURL('PR {}: {}'.format(pr_number, title), GitHub.pr_url(pr_number, repository_url))
+title = f': {title}' if title else ''
+self.addURL(f'PR {pr_number}{title}', GitHub.pr_url(pr_number, repository_url))
 if owners:
 email, errors = GitHub.email_for_owners(owners)
 for error in errors:


Modified: trunk/Tools/ChangeLog (293613 => 293614)

--- trunk/Tools/ChangeLog	2022-04-29 15:11:40 UTC (rev 293613)
+++ trunk/Tools/ChangeLog	2022-04-29 15:24:12 UTC (rev 293614)
@@ -1,3 +1,14 @@
+2022-04-27  Jonathan Bedard  
+
+[ews-build.webkit.org] Link to PRs with undefined title
+https://bugs.webkit.org/show_bug.cgi?id=239820
+
+
+Reviewed by Aakash Jain.
+
+* CISupport/ews-build/steps.py:
+(ConfigureBuild.add_pr_details):
+
 2022-04-28  Yusuke Suzuki  
 
 Support C files in Unified Builds






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [293575] trunk/Tools

2022-04-28 Thread jbedard
Title: [293575] trunk/Tools








Revision 293575
Author jbed...@apple.com
Date 2022-04-28 09:34:15 -0700 (Thu, 28 Apr 2022)


Log Message
[webkitbugspy] Limit number of failed bugzilla login attempts
https://bugs.webkit.org/show_bug.cgi?id=239850


Reviewed by Michael Catanzaro.

* Tools/Scripts/libraries/webkitbugspy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/bugzilla.py:
(Tracker.__init__): Caller can define the number of failed login attempts.
(Tracker.user): Detect a failed login.
(Tracker._login_arguments): Only provide login arguments if login attempts
have not been exceeded.
(Tracker.populate): Detect a failed login.
(Tracker.set): Detect a failed login, handle case where login arguments are
not provided due to exceeded login attempts.
(Tracker.add_comment): Ditto.
(Tracker.projects): Detect a failed login.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/bugzilla_unittest.py:

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

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitbugspy/setup.py
trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py
trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/bugzilla.py
trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/bugzilla_unittest.py




Diff

Modified: trunk/Tools/ChangeLog (293574 => 293575)

--- trunk/Tools/ChangeLog	2022-04-28 16:27:51 UTC (rev 293574)
+++ trunk/Tools/ChangeLog	2022-04-28 16:34:15 UTC (rev 293575)
@@ -1,3 +1,25 @@
+2022-04-28  Jonathan Bedard  
+
+[webkitbugspy] Limit number of failed bugzilla login attempts
+https://bugs.webkit.org/show_bug.cgi?id=239850
+
+
+Reviewed by Michael Catanzaro.
+
+* Scripts/libraries/webkitbugspy/setup.py: Bump version.
+* Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py: Ditto.
+* Scripts/libraries/webkitbugspy/webkitbugspy/bugzilla.py:
+(Tracker.__init__): Caller can define the number of failed login attempts.
+(Tracker.user): Detect a failed login.
+(Tracker._login_arguments): Only provide login arguments if login attempts
+have not been exceeded.
+(Tracker.populate): Detect a failed login.
+(Tracker.set): Detect a failed login, handle case where login arguments are
+not provided due to exceeded login attempts.
+(Tracker.add_comment): Ditto.
+(Tracker.projects): Detect a failed login.
+* Scripts/libraries/webkitbugspy/webkitbugspy/tests/bugzilla_unittest.py:
+
 2022-04-28  Kimmo Kinnunen  
 
 test-webkitperl outputs errors about uninitialized $platform variable


Modified: trunk/Tools/Scripts/libraries/webkitbugspy/setup.py (293574 => 293575)

--- trunk/Tools/Scripts/libraries/webkitbugspy/setup.py	2022-04-28 16:27:51 UTC (rev 293574)
+++ trunk/Tools/Scripts/libraries/webkitbugspy/setup.py	2022-04-28 16:34:15 UTC (rev 293575)
@@ -30,7 +30,7 @@
 
 setup(
 name='webkitbugspy',
-version='0.5.3',
+version='0.5.4',
 description='Library containing a shared API for various bug trackers.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py (293574 => 293575)

--- trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py	2022-04-28 16:27:51 UTC (rev 293574)
+++ trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py	2022-04-28 16:34:15 UTC (rev 293575)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(0, 5, 3)
+version = Version(0, 5, 4)
 
 from .user import User
 from .issue import Issue


Modified: trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/bugzilla.py (293574 => 293575)

--- trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/bugzilla.py	2022-04-28 16:27:51 UTC (rev 293574)
+++ trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/bugzilla.py	2022-04-28 16:34:15 UTC (rev 293575)
@@ -56,10 +56,10 @@
 raise TypeError('Cannot invoke parent class when classmethod')
 return super(Tracker.Encoder, context).default(obj)
 
-
-def __init__(self, url, users=None, res=None):
+def __init__(self, url, users=None, res=None, login_attempts=3):
 super(Tracker, self).__init__(users=users)
 
+self._logins_left = login_attempts + 1 if login_attempts else 1
 match = self.ROOT_RE.match(url)
 if not match:
 raise TypeError("'{}' is not a valid bugzilla url".format(url))
@@ -89,6 +89,8 @@
 query='names={name}'.format(name=username or email or name),
 ),
 ))
+if response.status_code // 100 == 4 and self._logins_left:
+self._logins_left -= 1
 response = response.json().get('users') if response.status_code // 100 == 2 else None
 if not 

[webkit-changes] [293557] trunk

2022-04-27 Thread jbedard
Title: [293557] trunk








Revision 293557
Author jbed...@apple.com
Date 2022-04-27 20:03:33 -0700 (Wed, 27 Apr 2022)


Log Message
[git-webkit] Run style checker
https://bugs.webkit.org/show_bug.cgi?id=239730


Reviewed by Chris Dumez.

* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git): Add webkitscmpy.auto-check option.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:
(PullRequest.parser): Add --check/--no-check flag.
(PullRequest.pre_pr_checks): Find and run all pre-PR checks.
(PullRequest.create_pull_request): Run PR checks.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/revert_unittest.py:
* metadata/git_config_extension: Add style-checker as pre-pr check.

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

Modified Paths

trunk/ChangeLog
trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/revert_unittest.py
trunk/metadata/git_config_extension




Diff

Modified: trunk/ChangeLog (293556 => 293557)

--- trunk/ChangeLog	2022-04-28 02:46:27 UTC (rev 293556)
+++ trunk/ChangeLog	2022-04-28 03:03:33 UTC (rev 293557)
@@ -1,3 +1,13 @@
+2022-04-27  Jonathan Bedard  
+
+[git-webkit] Run style checker
+https://bugs.webkit.org/show_bug.cgi?id=239730
+
+
+Reviewed by Chris Dumez.
+
+* metadata/git_config_extension: Add style-checker as pre-pr check.
+
 2022-04-26  Michael Catanzaro  
 
 Unreviewed, add my @redhat.com email


Modified: trunk/Tools/ChangeLog (293556 => 293557)

--- trunk/Tools/ChangeLog	2022-04-28 02:46:27 UTC (rev 293556)
+++ trunk/Tools/ChangeLog	2022-04-28 03:03:33 UTC (rev 293557)
@@ -1,5 +1,24 @@
 2022-04-27  Jonathan Bedard  
 
+[git-webkit] Run style checker
+https://bugs.webkit.org/show_bug.cgi?id=239730
+
+
+Reviewed by Chris Dumez.
+
+* Scripts/libraries/webkitscmpy/setup.py: Bump version.
+* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
+* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
+(Git): Add webkitscmpy.auto-check option.
+* Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:
+(PullRequest.parser): Add --check/--no-check flag.
+(PullRequest.pre_pr_checks): Find and run all pre-PR checks.
+(PullRequest.create_pull_request): Run PR checks.
+* Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:
+* Scripts/libraries/webkitscmpy/webkitscmpy/test/revert_unittest.py:
+
+2022-04-27  Jonathan Bedard  
+
 [git-webkit] Cleanup PRs on alternate remotes
 https://bugs.webkit.org/show_bug.cgi?id=239814
 


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (293556 => 293557)

--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-04-28 02:46:27 UTC (rev 293556)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-04-28 03:03:33 UTC (rev 293557)
@@ -29,7 +29,7 @@
 
 setup(
 name='webkitscmpy',
-version='4.11.4',
+version='4.12.0',
 description='Library designed to interact with git and svn repositories.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (293556 => 293557)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-04-28 02:46:27 UTC (rev 293556)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-04-28 03:03:33 UTC (rev 293557)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(4, 11, 4)
+version = Version(4, 12, 0)
 
 AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
 AutoInstall.register(Package('jinja2', Version(2, 11, 3)))


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py (293556 => 293557)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py	2022-04-28 02:46:27 UTC (rev 293556)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py	2022-04-28 03:03:33 UTC (rev 293557)
@@ -308,6 +308,7 @@
 'webkitscmpy.pull-request': ['overwrite', 'append'],
 'webkitscmpy.history': ['when-user-owned', 'disabled', 'always', 'never'],
 'webkitscmpy.update-fork': ['true', 'false'],
+'webkitscmpy.auto-check': ['true', 'false'],
 }
 CONFIG_LOCATIONS = ['global', 

[webkit-changes] [293545] trunk/Tools

2022-04-27 Thread jbedard
Title: [293545] trunk/Tools








Revision 293545
Author jbed...@apple.com
Date 2022-04-27 16:42:12 -0700 (Wed, 27 Apr 2022)


Log Message
[git-webkit] Cleanup PRs on alternate remotes
https://bugs.webkit.org/show_bug.cgi?id=239814


Reviewed by Aakash Jain.

* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/clean.py:
(Clean.parser): Add --remote argument.
(Clean.cleanup): Allow caller to specify remote.
(Clean.main): Pass remote to cleanup.

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

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/clean.py




Diff

Modified: trunk/Tools/ChangeLog (293544 => 293545)

--- trunk/Tools/ChangeLog	2022-04-27 23:36:54 UTC (rev 293544)
+++ trunk/Tools/ChangeLog	2022-04-27 23:42:12 UTC (rev 293545)
@@ -1,5 +1,20 @@
 2022-04-27  Jonathan Bedard  
 
+[git-webkit] Cleanup PRs on alternate remotes
+https://bugs.webkit.org/show_bug.cgi?id=239814
+
+
+Reviewed by Aakash Jain.
+
+* Scripts/libraries/webkitscmpy/setup.py: Bump version.
+* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
+* Scripts/libraries/webkitscmpy/webkitscmpy/program/clean.py:
+(Clean.parser): Add --remote argument.
+(Clean.cleanup): Allow caller to specify remote.
+(Clean.main): Pass remote to cleanup.
+
+2022-04-27  Jonathan Bedard  
+
 [ews-build.webkit.org] Support alternative remotes (Follow-up fix)
 https://bugs.webkit.org/show_bug.cgi?id=239617
 


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (293544 => 293545)

--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-04-27 23:36:54 UTC (rev 293544)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-04-27 23:42:12 UTC (rev 293545)
@@ -29,7 +29,7 @@
 
 setup(
 name='webkitscmpy',
-version='4.11.3',
+version='4.11.4',
 description='Library designed to interact with git and svn repositories.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (293544 => 293545)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-04-27 23:36:54 UTC (rev 293544)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-04-27 23:42:12 UTC (rev 293545)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(4, 11, 3)
+version = Version(4, 11, 4)
 
 AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
 AutoInstall.register(Package('jinja2', Version(2, 11, 3)))


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/clean.py (293544 => 293545)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/clean.py	2022-04-27 23:36:54 UTC (rev 293544)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/clean.py	2022-04-27 23:42:12 UTC (rev 293545)
@@ -41,15 +41,24 @@
 type=str, default=None,
 help='String representation(s) of a commit or branch to be cleaned',
 )
+parser.add_argument(
+'--remote', dest='remote', type=str, default=None,
+help='Specify remote to search for pull request from.',
+)
 
 @classmethod
-def cleanup(cls, repository, argument):
+def cleanup(cls, repository, argument, remote_target=None):
 if not repository.is_git:
 sys.stderr('Can only cleanup branches on git repositories\n')
 return 1
 
-rmt = repository.remote()
-target = 'fork' if isinstance(rmt, remote.GitHub) else 'origin'
+rmt = repository.remote(name=remote_target)
+if isinstance(rmt, remote.GitHub) and remote_target in (None, 'origin'):
+target = 'fork'
+elif isinstance(rmt, remote.GitHub):
+target = '{}-fork'.format(remote_target)
+else:
+target = 'origin'
 
 match = cls.PR_RE.match(argument)
 if match:
@@ -103,5 +112,5 @@
 
 result = 0
 for argument in args.arguments:
-result += cls.cleanup(repository, argument)
+result += cls.cleanup(repository, argument, remote_target=args.remote)
 return result






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [293527] trunk/Tools

2022-04-27 Thread jbedard
Title: [293527] trunk/Tools








Revision 293527
Author jbed...@apple.com
Date 2022-04-27 12:09:37 -0700 (Wed, 27 Apr 2022)


Log Message
[ews-build.webkit.org] Support alternative remotes (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=239617


Unreviewed follow-up fix.

* Tools/CISupport/ews-build/events.py:
(GitHubEventHandlerNoEdits.extractProperties):

Modified Paths

trunk/Tools/CISupport/ews-build/events.py
trunk/Tools/ChangeLog




Diff

Modified: trunk/Tools/CISupport/ews-build/events.py (293526 => 293527)

--- trunk/Tools/CISupport/ews-build/events.py	2022-04-27 19:07:11 UTC (rev 293526)
+++ trunk/Tools/CISupport/ews-build/events.py	2022-04-27 19:09:37 UTC (rev 293527)
@@ -364,7 +364,7 @@
 
 def extractProperties(self, payload):
 result = super(GitHubEventHandlerNoEdits, self).extractProperties(payload)
-if payload.get('repository', {}).get('full_name') not in self.PUBLIC_REPOS:
+if payload.get('base', {}).get('repo', {}).get('full_name') not in self.PUBLIC_REPOS:
 for field in self.SENSATIVE_FIELDS:
 if field in result:
 del result[field]


Modified: trunk/Tools/ChangeLog (293526 => 293527)

--- trunk/Tools/ChangeLog	2022-04-27 19:07:11 UTC (rev 293526)
+++ trunk/Tools/ChangeLog	2022-04-27 19:09:37 UTC (rev 293527)
@@ -1,3 +1,14 @@
+2022-04-27  Jonathan Bedard  
+
+[ews-build.webkit.org] Support alternative remotes (Follow-up fix)
+https://bugs.webkit.org/show_bug.cgi?id=239617
+
+
+Unreviewed follow-up fix.
+
+* CISupport/ews-build/events.py:
+(GitHubEventHandlerNoEdits.extractProperties):
+
 2022-04-27  Aditya Keerthi  
 
 [iOS] Focus changes unexpectedly when scrolling to a found text range






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [293515] trunk/Tools

2022-04-27 Thread jbedard
Title: [293515] trunk/Tools








Revision 293515
Author jbed...@apple.com
Date 2022-04-27 10:15:53 -0700 (Wed, 27 Apr 2022)


Log Message
test-webkitpy TestInstallGitLFS fails
https://bugs.webkit.org/show_bug.cgi?id=239788


Reviewed by Michael Catanzaro.

* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/install_git_lfs_unittest.py:
(TestInstallGitLFS.test_install): Specify mock system and machine.
(TestInstallGitLFS.test_configure): Ditto.
(TestInstallGitLFS.test_no_op): Ditto.
(TestInstallGitLFS.test_no_repo): Ditto.

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

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/install_git_lfs_unittest.py




Diff

Modified: trunk/Tools/ChangeLog (293514 => 293515)

--- trunk/Tools/ChangeLog	2022-04-27 17:12:06 UTC (rev 293514)
+++ trunk/Tools/ChangeLog	2022-04-27 17:15:53 UTC (rev 293515)
@@ -1,5 +1,21 @@
 2022-04-27  Jonathan Bedard  
 
+test-webkitpy TestInstallGitLFS fails
+https://bugs.webkit.org/show_bug.cgi?id=239788
+
+
+Reviewed by Michael Catanzaro.
+
+* Scripts/libraries/webkitscmpy/setup.py: Bump version.
+* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
+* Scripts/libraries/webkitscmpy/webkitscmpy/test/install_git_lfs_unittest.py:
+(TestInstallGitLFS.test_install): Specify mock system and machine.
+(TestInstallGitLFS.test_configure): Ditto.
+(TestInstallGitLFS.test_no_op): Ditto.
+(TestInstallGitLFS.test_no_repo): Ditto.
+
+2022-04-27  Jonathan Bedard  
+
 [commits.webkit.org] Change branch forwarding behavior
 https://bugs.webkit.org/show_bug.cgi?id=239136
 


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (293514 => 293515)

--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-04-27 17:12:06 UTC (rev 293514)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-04-27 17:15:53 UTC (rev 293515)
@@ -29,7 +29,7 @@
 
 setup(
 name='webkitscmpy',
-version='4.11.2',
+version='4.11.3',
 description='Library designed to interact with git and svn repositories.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (293514 => 293515)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-04-27 17:12:06 UTC (rev 293514)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-04-27 17:15:53 UTC (rev 293515)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(4, 11, 2)
+version = Version(4, 11, 3)
 
 AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
 AutoInstall.register(Package('jinja2', Version(2, 11, 3)))


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/install_git_lfs_unittest.py (293514 => 293515)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/install_git_lfs_unittest.py	2022-04-27 17:12:06 UTC (rev 293514)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/install_git_lfs_unittest.py	2022-04-27 17:15:53 UTC (rev 293515)
@@ -78,7 +78,7 @@
 with OutputCapture() as captured, mocks.remote.GitHub('github.com/git-lfs/git-lfs', releases={
 'v3.1.2/git-lfs-darwin-arm64-v3.1.2.zip': wkmocks.Response(status_code=200, content=self.ZIP_CONTENTS),
 'v3.1.2/git-lfs-darwin-amd64-v3.1.2.zip': wkmocks.Response(status_code=200, content=self.ZIP_CONTENTS),
-}), mocks.local.Git(self.path), mocks.local.Svn():
+}), mocks.local.Git(self.path), mocks.local.Svn(), patch('platform.system', lambda: 'Darwin'), patch('platform.machine', lambda: 'x86_64'):
 self.assertIsNone(local.Git(self.path).config().get('lfs.repositoryformatversion'))
 self.assertEqual(0, program.main(
 args=('install-git-lfs',),
@@ -97,7 +97,7 @@
 with OutputCapture() as captured, mocks.remote.GitHub('github.com/git-lfs/git-lfs', releases={
 'v3.1.2/git-lfs-darwin-arm64-v3.1.2.zip': wkmocks.Response(status_code=200, content=self.ZIP_CONTENTS),
 'v3.1.2/git-lfs-darwin-amd64-v3.1.2.zip': wkmocks.Response(status_code=200, content=self.ZIP_CONTENTS),
-}), mocks.local.Git(self.path) as mocked, mocks.local.Svn():
+}), mocks.local.Git(self.path) as mocked, mocks.local.Svn(), patch('platform.system', lambda: 'Darwin'), patch('platform.machine', lambda: 'x86_64'):
 mocked.has_git_lfs = True
 
 self.assertIsNone(local.Git(self.path).config().get('lfs.repositoryformatversion'))
@@ -117,7 +117,7 @@
 with OutputCapture() as captured, 

[webkit-changes] [293514] trunk/Tools

2022-04-27 Thread jbedard
Title: [293514] trunk/Tools








Revision 293514
Author jbed...@apple.com
Date 2022-04-27 10:12:06 -0700 (Wed, 27 Apr 2022)


Log Message
[commits.webkit.org] Change branch forwarding behavior
https://bugs.webkit.org/show_bug.cgi?id=239136


Reviewed by Dewei Zhu.

* Tools/Scripts/libraries/reporelaypy/reporelaypy/__init__.py: Bump version.
* Tools/Scripts/libraries/reporelaypy/setup.py: Ditto.
* Tools/Scripts/libraries/reporelaypy/reporelaypy/checkout.py:
(Checkout.Encoder.default): Encode forwarding list.
(Checkout.__init__): Add forwarding argument.
(Checkout.push_update): Add dest_branch argument.
(Checkout.forward_update): Trigger push_update based on forwarding arguments.
(Checkout.update_all): Use forward_update instead of pushing to every branch.
* Tools/Scripts/libraries/reporelaypy/reporelaypy/hooks.py:
(HookProcessor.process_worker_hook): Extract remote from incoming data, invoke forward_update.
* Tools/Scripts/libraries/reporelaypy/reporelaypy/tests/checkout_unittest.py:
(CheckoutUnittest.test_json):

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

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/reporelaypy/reporelaypy/__init__.py
trunk/Tools/Scripts/libraries/reporelaypy/reporelaypy/checkout.py
trunk/Tools/Scripts/libraries/reporelaypy/reporelaypy/hooks.py
trunk/Tools/Scripts/libraries/reporelaypy/reporelaypy/tests/checkout_unittest.py
trunk/Tools/Scripts/libraries/reporelaypy/setup.py




Diff

Modified: trunk/Tools/ChangeLog (293513 => 293514)

--- trunk/Tools/ChangeLog	2022-04-27 17:06:09 UTC (rev 293513)
+++ trunk/Tools/ChangeLog	2022-04-27 17:12:06 UTC (rev 293514)
@@ -1,3 +1,24 @@
+2022-04-27  Jonathan Bedard  
+
+[commits.webkit.org] Change branch forwarding behavior
+https://bugs.webkit.org/show_bug.cgi?id=239136
+
+
+Reviewed by Dewei Zhu.
+
+* Scripts/libraries/reporelaypy/reporelaypy/__init__.py: Bump version.
+* Scripts/libraries/reporelaypy/setup.py: Ditto.
+* Scripts/libraries/reporelaypy/reporelaypy/checkout.py:
+(Checkout.Encoder.default): Encode forwarding list.
+(Checkout.__init__): Add forwarding argument.
+(Checkout.push_update): Add dest_branch argument.
+(Checkout.forward_update): Trigger push_update based on forwarding arguments.
+(Checkout.update_all): Use forward_update instead of pushing to every branch.
+* Scripts/libraries/reporelaypy/reporelaypy/hooks.py:
+(HookProcessor.process_worker_hook): Extract remote from incoming data, invoke forward_update.
+* Scripts/libraries/reporelaypy/reporelaypy/tests/checkout_unittest.py:
+(CheckoutUnittest.test_json):
+
 2022-04-27  Kimmo Kinnunen  
 
 test-webkitperl outputs git hints during the test


Modified: trunk/Tools/Scripts/libraries/reporelaypy/reporelaypy/__init__.py (293513 => 293514)

--- trunk/Tools/Scripts/libraries/reporelaypy/reporelaypy/__init__.py	2022-04-27 17:06:09 UTC (rev 293513)
+++ trunk/Tools/Scripts/libraries/reporelaypy/reporelaypy/__init__.py	2022-04-27 17:12:06 UTC (rev 293514)
@@ -44,7 +44,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(0, 5, 2)
+version = Version(0, 6, 0)
 
 import webkitflaskpy
 


Modified: trunk/Tools/Scripts/libraries/reporelaypy/reporelaypy/checkout.py (293513 => 293514)

--- trunk/Tools/Scripts/libraries/reporelaypy/reporelaypy/checkout.py	2022-04-27 17:06:09 UTC (rev 293513)
+++ trunk/Tools/Scripts/libraries/reporelaypy/reporelaypy/checkout.py	2022-04-27 17:12:06 UTC (rev 293514)
@@ -50,6 +50,7 @@
 url=""
 sentinal=obj.sentinal,
 remotes=obj.remotes,
+forwarding=obj.forwarding,
 credentials=obj.credentials,
 )
 if obj.fallback_repository:
@@ -104,11 +105,17 @@
 with open(os.path.expanduser('~/.git-credentials'), 'w') as f:
 f.write(git_credentials_content)
 
-def __init__(self, path, url="" http_proxy=None, sentinal=True, fallback_url=None, primary=True, remotes=None, credentials=None):
+def __init__(
+self, path, url="" http_proxy=None,
+sentinal=True, fallback_url=None, primary=True,
+remotes=None, credentials=None,
+forwarding=None,
+):
 self.sentinal = sentinal
 self.path = path
 self.url = ""
 self.remotes = remotes or dict()
+self.forwarding = forwarding or [('origin', list(self.remotes.keys()))]
 self.credentials = credentials or dict()
 self._repository = None
 self._child_process = None
@@ -204,8 +211,8 @@
 return ref == line.split()[0]
 return False
 
-def push_update(self, branch=None, tag=None, remote=None, track=False):
-if not remote or remote in (self.REMOTE, 'fork'):
+def push_update(self, branch=None, tag=None, remote=None, track=False, dest_branch=None):

[webkit-changes] [293479] trunk/Tools

2022-04-26 Thread jbedard
Title: [293479] trunk/Tools








Revision 293479
Author jbed...@apple.com
Date 2022-04-26 15:56:27 -0700 (Tue, 26 Apr 2022)


Log Message
[build.webkit.org] Support identifiers on dashboard (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=239473


Unreviewed test gardening.

* Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/tests/index-expected.txt:

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

Modified Paths

trunk/Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/tests/index-expected.txt
trunk/Tools/ChangeLog




Diff

Modified: trunk/Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/tests/index-expected.txt (293478 => 293479)

--- trunk/Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/tests/index-expected.txt	2022-04-26 22:48:12 UTC (rev 293478)
+++ trunk/Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/tests/index-expected.txt	2022-04-26 22:56:27 UTC (rev 293479)
@@ -1,7 +1,5 @@
 WebKit Bot Watcher's Dashboard QUnit Test Runner noglobalsnotrycatch
 Hide passed tests
-Trac: _loaded (0, 8, 8)Rerun
-Trac: parse gitBranches (0, 7, 7)Rerun
 Trac: _parseRevisionFromURL (0, 3, 3)Rerun
 Trac: nextRevision (0, 2, 2)Rerun
 Trac: indexOfRevision (0, 1, 1)Rerun
@@ -16,10 +14,8 @@
 BuildBotQueueView: _popoverLinesForCommitRange (0, 1, 1)Rerun
 BuildBotQueueView: _presentPopoverForPendingCommits (0, 1, 1)Rerun
 BuildBotQueueView: _presentPopoverForPendingCommits no pending commits (0, 1, 1)Rerun
-BuildBotQueueView: _presentPopoverForRevisionRange (0, 1, 1)Rerun
-BuildBotQueueView: _presentPopoverForRevisionRange no commits (0, 1, 1)Rerun
-BuildBotQueueView: _revisionContentWithPopoverForIteration (0, 3, 3)Rerun
-BuildBotQueueView: _revisionContentWithPopoverForIteration has previousIteration (0, 4, 4)Rerun
+BuildBotQueueView: _revisionContentWithPopoverForIteration (0, 2, 2)Rerun
+BuildBotQueueView: _revisionContentWithPopoverForIteration has previousIteration (0, 2, 2)Rerun
 BuildBotQueueView: _formatRevisionForDisplay Subversion (0, 1, 1)Rerun
 BuildBotQueueView: _formatRevisionForDisplay Git (0, 1, 1)Rerun
 BuildBotQueueView: _popoverContentForJavaScriptCoreTestRegressions load failure UI test (0, 3, 3)Rerun
@@ -32,14 +28,7 @@
 BuildBotQueue: compareIterations by id (revisions not specified) (0, 3, 3)Rerun
 BuildBotQueue: compareIterations by id (same revision) (0, 3, 3)Rerun
 BuildBotQueue: compareIterationsByRevisions (0, 3, 3)Rerun
-r33022bob@webkit.orgcommit message
-commits since previous result
-r33020george@webkit.orgcommit message
-r33018john@webkit.orgcommit message
-no commits to trunk since previous result
-commits since previous result
-r33022bob@webkit.orgcommit message
-r33020george@webkit.orgcommit message
+33022@main
 idbuild #1javascriptcore test failures
 Loading…
 idbuild #1javascriptcore test failures


Modified: trunk/Tools/ChangeLog (293478 => 293479)

--- trunk/Tools/ChangeLog	2022-04-26 22:48:12 UTC (rev 293478)
+++ trunk/Tools/ChangeLog	2022-04-26 22:56:27 UTC (rev 293479)
@@ -1,3 +1,13 @@
+2022-04-21  Jonathan Bedard  
+
+[build.webkit.org] Support identifiers on dashboard (Follow-up fix)
+https://bugs.webkit.org/show_bug.cgi?id=239473
+
+
+Unreviewed test gardening.
+
+* CISupport/build-webkit-org/public_html/dashboard/Scripts/tests/index-expected.txt:
+
 2022-04-26  Jonathan Bedard  
 
 [ews-build.webkit.org] Support alternative remotes (Follow-up fix)






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [293477] trunk/Tools

2022-04-26 Thread jbedard
Title: [293477] trunk/Tools








Revision 293477
Author jbed...@apple.com
Date 2022-04-26 15:45:06 -0700 (Tue, 26 Apr 2022)


Log Message
[ews-build.webkit.org] Support alternative remotes (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=239617


Reviewed by Aakash Jain.

* Tools/CISupport/ews-build/events.py:
(GitHubEventHandlerNoEdits.extractProperties): 'project' is not set by extractProperties.

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

Modified Paths

trunk/Tools/CISupport/ews-build/events.py
trunk/Tools/ChangeLog




Diff

Modified: trunk/Tools/CISupport/ews-build/events.py (293476 => 293477)

--- trunk/Tools/CISupport/ews-build/events.py	2022-04-26 22:36:52 UTC (rev 293476)
+++ trunk/Tools/CISupport/ews-build/events.py	2022-04-26 22:45:06 UTC (rev 293477)
@@ -364,7 +364,7 @@
 
 def extractProperties(self, payload):
 result = super(GitHubEventHandlerNoEdits, self).extractProperties(payload)
-if result.get('project') not in self.PUBLIC_REPOS:
+if payload.get('repository', {}).get('full_name') not in self.PUBLIC_REPOS:
 for field in self.SENSATIVE_FIELDS:
 if field in result:
 del result[field]


Modified: trunk/Tools/ChangeLog (293476 => 293477)

--- trunk/Tools/ChangeLog	2022-04-26 22:36:52 UTC (rev 293476)
+++ trunk/Tools/ChangeLog	2022-04-26 22:45:06 UTC (rev 293477)
@@ -1,5 +1,16 @@
 2022-04-26  Jonathan Bedard  
 
+[ews-build.webkit.org] Support alternative remotes (Follow-up fix)
+https://bugs.webkit.org/show_bug.cgi?id=239617
+
+
+Reviewed by Aakash Jain.
+
+* CISupport/ews-build/events.py:
+(GitHubEventHandlerNoEdits.extractProperties): 'project' is not set by extractProperties.
+
+2022-04-26  Jonathan Bedard  
+
 [git-webkit] Checkout PRs from alternate remotes
 https://bugs.webkit.org/show_bug.cgi?id=239745
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [293476] trunk/Tools

2022-04-26 Thread jbedard
Title: [293476] trunk/Tools








Revision 293476
Author jbed...@apple.com
Date 2022-04-26 15:36:52 -0700 (Tue, 26 Apr 2022)


Log Message
[git-webkit] Checkout PRs from alternate remotes
https://bugs.webkit.org/show_bug.cgi?id=239745


Reviewed by Dewei Zhu.

* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git): The name of the repository is embedded in the argument.
(Git.checkout): Handle remote-postfixed remote names.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/checkout.py:
(Checkout.parser): Add --remote command.
(Checkout.main): Use the full repo name instead of the owner's username.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py:
(GitHub.PRGenerator.PullRequest): Pass full repo name as metadata.

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

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/checkout.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py




Diff

Modified: trunk/Tools/ChangeLog (293475 => 293476)

--- trunk/Tools/ChangeLog	2022-04-26 22:33:08 UTC (rev 293475)
+++ trunk/Tools/ChangeLog	2022-04-26 22:36:52 UTC (rev 293476)
@@ -1,5 +1,24 @@
 2022-04-26  Jonathan Bedard  
 
+[git-webkit] Checkout PRs from alternate remotes
+https://bugs.webkit.org/show_bug.cgi?id=239745
+
+
+Reviewed by Dewei Zhu.
+
+* Scripts/libraries/webkitscmpy/setup.py: Bump version.
+* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
+* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
+(Git): The name of the repository is embedded in the argument.
+(Git.checkout): Handle remote-postfixed remote names.
+* Scripts/libraries/webkitscmpy/webkitscmpy/program/checkout.py:
+(Checkout.parser): Add --remote command.
+(Checkout.main): Use the full repo name instead of the owner's username.
+* Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py:
+(GitHub.PRGenerator.PullRequest): Pass full repo name as metadata.
+
+2022-04-26  Jonathan Bedard  
+
 [build.webkit.org] Support identifiers in popover
 https://bugs.webkit.org/show_bug.cgi?id=239773
 


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (293475 => 293476)

--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-04-26 22:33:08 UTC (rev 293475)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-04-26 22:36:52 UTC (rev 293476)
@@ -29,7 +29,7 @@
 
 setup(
 name='webkitscmpy',
-version='4.11.1',
+version='4.11.2',
 description='Library designed to interact with git and svn repositories.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (293475 => 293476)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-04-26 22:33:08 UTC (rev 293475)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-04-26 22:36:52 UTC (rev 293476)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(4, 11, 1)
+version = Version(4, 11, 2)
 
 AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
 AutoInstall.register(Package('jinja2', Version(2, 11, 3)))


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py (293475 => 293476)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py	2022-04-26 22:33:08 UTC (rev 293475)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py	2022-04-26 22:36:52 UTC (rev 293476)
@@ -301,7 +301,7 @@
 SSH_REMOTE = re.compile('(ssh://)?git@(?P[^:/]+)[:/](?P.+).git')
 HTTP_REMOTE = re.compile(r'(?Phttps?)://(?P[^\/]+)/(?P.+).git')
 REMOTE_BRANCH = re.compile(r'remotes\/(?P[^\/]+)\/(?P.+)')
-USER_REMOTE = re.compile(r'(?P[^:/]+):(?P.+)')
+USER_REMOTE = re.compile(r'(?P[^:]+):(?P.+)')
 GIT_CONFIG_EXTENSION = 'git_config_extension'
 PROJECT_CONFIG_OPTIONS = {
 'pull.rebase': ['true', 'false'],
@@ -864,34 +864,38 @@
 match = self.USER_REMOTE.match(argument)
 rmt = self.remote()
 if match and isinstance(rmt, remote.GitHub):
-username = match.group('username')
-if not self.url(match.group('username')):
+name = match.group('name')
+username = name.split('/')[0]
+repo_name = rmt.name if '/' not in name else name.split('/', 1)[-1]
+name = username + repo_name[len(rmt.name):]
+
+if not self.url(name):
 url = ""
  

[webkit-changes] [293475] trunk/Tools

2022-04-26 Thread jbedard
Title: [293475] trunk/Tools








Revision 293475
Author jbed...@apple.com
Date 2022-04-26 15:33:08 -0700 (Tue, 26 Apr 2022)


Log Message
[build.webkit.org] Support identifiers in popover
https://bugs.webkit.org/show_bug.cgi?id=239773


Rubber-stamped by Aakash Jain.

* Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/Commits.js:
(Commits): Keep track of all fetched commits.
(Commits.prototype._update): Save fetched commits.
(Commits.prototype.lastNIdentifiers): Return a list of the last n identifiers
on a branch.
(Commits.prototype.fetch): Load information for last N commits.
(Commits.prototype.urlFor): Return a url for a commit ref.
* Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/Main.js: Remove
trac auto-updater.
* Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/QueueView.js:
(QueueView.prototype._appendPendingRevisionCount): After we determine the
number of commits behind, fetch that many commits.
(QueueView.prototype._popoverLinesForCommitRange): Support commits with identifiers.
(QueueView.prototype._presentPopoverForPendingCommits):
* Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/tests/resources/MockCommits.js:
* Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/tests/resources/tests.js:

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

Modified Paths

trunk/Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/Commits.js
trunk/Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/Main.js
trunk/Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/QueueView.js
trunk/Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/tests/resources/MockCommits.js
trunk/Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/tests/resources/tests.js
trunk/Tools/ChangeLog




Diff

Modified: trunk/Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/Commits.js (293474 => 293475)

--- trunk/Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/Commits.js	2022-04-26 22:25:12 UTC (rev 293474)
+++ trunk/Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/Commits.js	2022-04-26 22:33:08 UTC (rev 293475)
@@ -30,6 +30,7 @@
 console.assert(url);
 this.url = ""
 this.heads = {'main': null};
+this.commits = {}
 };
 
 BaseObject.addConstructorFunctions(Commits);
@@ -45,6 +46,7 @@
 Object.entries(self.heads).forEach(function(branch){
 JSON.load(self.url + '/' + branch[0] + '/json', function(data) {
 self.heads[branch[0]] = data;
+self.commits[data.identifier] = data;
 });
 });
 },
@@ -60,4 +62,36 @@
 return parseFloat(split[1]);
 return null
 },
+lastNIdentifiers(branch, count) {
+if (!this.heads[branch])
+return [];
+
+var split = this.heads[branch].identifier.split(/\.|@/);
+var result = [];
+for(; count--;) {
+var identifier = '';
+if (split.length === 2)
+identifier = `${parseFloat(split[0]) - count}@${branch}`;
+else if (split.length === 3)
+identifier = `${split[0]}.${parseFloat(split[1]) - count}@${branch}`;
+
+result.push(identifier);
+}
+return result.reverse();
+},
+fetch: function(branch, count) {
+var self = this;
+this.lastNIdentifiers(branch, count).forEach((identifier) => {
+if (self.commits[identifier] !== undefined)
+return;
+self.commits[identifier] = null;
+
+JSON.load(self.url + '/' + identifier + '/json', function(data) {
+self.commits[data.identifier] = data;
+});
+});
+},
+urlFor: function(identifier) {
+return `${this.url}/${identifier}`;
+}
 };


Modified: trunk/Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/Main.js (293474 => 293475)

--- trunk/Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/Main.js	2022-04-26 22:25:12 UTC (rev 293474)
+++ trunk/Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/Main.js	2022-04-26 22:33:08 UTC (rev 293475)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2013-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -331,9 +331,6 @@
 
 var sortedRepositories = Dashboard.sortedRepositories;
 for (var i = 0; i < sortedRepositories.length; ++i) {
-var trac = sortedRepositories[i].trac;
-if (typeof trac !== "undefined")
-trac.startPeriodicUpdates();
 var commits = sortedRepositories[i].commits;
 if (typeof commits !== "undefined")
 commits.startPeriodicUpdates();


Modified: trunk/Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/QueueView.js (293474 => 293475)

--- 

[webkit-changes] [293446] trunk/Tools

2022-04-26 Thread jbedard
Title: [293446] trunk/Tools








Revision 293446
Author jbed...@apple.com
Date 2022-04-26 13:02:21 -0700 (Tue, 26 Apr 2022)


Log Message
[webkit-patch] Use Commit-Queue when landing by default
https://bugs.webkit.org/show_bug.cgi?id=239777


Reviewed by Alexey Proskuryakov.

* Scripts/webkitpy/tool/commands/download.py:
(LandUnsafe): Renamed from LandUnsafe.
(Land): Renamed to LandUnsafe.
* Scripts/webkitpy/tool/commands/download_unittest.py:
* Scripts/webkitpy/tool/commands/upload.py:
(LandSafely):
(Land): Inherit from LandSafely.

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

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/tool/commands/download.py
trunk/Tools/Scripts/webkitpy/tool/commands/download_unittest.py
trunk/Tools/Scripts/webkitpy/tool/commands/upload.py




Diff

Modified: trunk/Tools/ChangeLog (293445 => 293446)

--- trunk/Tools/ChangeLog	2022-04-26 20:01:08 UTC (rev 293445)
+++ trunk/Tools/ChangeLog	2022-04-26 20:02:21 UTC (rev 293446)
@@ -1,3 +1,19 @@
+2022-04-26  Jonathan Bedard  
+
+[webkit-patch] Use Commit-Queue when landing by default
+https://bugs.webkit.org/show_bug.cgi?id=239777
+
+
+Reviewed by Alexey Proskuryakov.
+
+* Scripts/webkitpy/tool/commands/download.py:
+(LandUnsafe): Renamed from LandUnsafe.
+(Land): Renamed to LandUnsafe.
+* Scripts/webkitpy/tool/commands/download_unittest.py:
+* Scripts/webkitpy/tool/commands/upload.py:
+(LandSafely):
+(Land): Inherit from LandSafely.
+
 2022-04-26  Wenson Hsieh  
 
 Adjust some image transcoding behaviors related to "Copy Cropped Image"


Modified: trunk/Tools/Scripts/webkitpy/tool/commands/download.py (293445 => 293446)

--- trunk/Tools/Scripts/webkitpy/tool/commands/download.py	2022-04-26 20:01:08 UTC (rev 293445)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/download.py	2022-04-26 20:02:21 UTC (rev 293446)
@@ -57,11 +57,11 @@
 options.force_clean = True
 
 
-class Land(AbstractSequencedCommand):
-name = "land"
+class LandUnsafe(AbstractSequencedCommand):
+name = "land-unsafe"
 help_text = "Land the current working directory diff and updates the associated bug if any"
 argument_names = "[BUGID]"
-show_in_main_help = True
+show_in_main_help = False
 steps = [
 steps.AddSvnMimetypeForPng,
 steps.UpdateChangeLogsWithReviewer,


Modified: trunk/Tools/Scripts/webkitpy/tool/commands/download_unittest.py (293445 => 293446)

--- trunk/Tools/Scripts/webkitpy/tool/commands/download_unittest.py	2022-04-26 20:01:08 UTC (rev 293445)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/download_unittest.py	2022-04-26 20:02:21 UTC (rev 293446)
@@ -133,7 +133,7 @@
 mock_tool = MockTool()
 mock_tool.scm().create_patch = Mock(return_value="Patch1\nMockPatch\n")
 mock_tool.checkout().modified_changelogs = Mock(return_value=[])
-self.assert_execute_outputs(Land(), [5], options=self._default_options(), expected_logs=expected_logs, tool=mock_tool)
+self.assert_execute_outputs(LandUnsafe(), [5], options=self._default_options(), expected_logs=expected_logs, tool=mock_tool)
 # Make sure we're not calling expensive calls too often.
 self.assertEqual(mock_tool.scm().create_patch.call_count, 0)
 self.assertEqual(mock_tool.checkout().modified_changelogs.call_count, 1)
@@ -162,7 +162,7 @@
 with self.mock_svn_remote():
 mock_tool = MockTool()
 mock_tool.buildbot.light_tree_on_fire()
-self.assert_execute_outputs(Land(), [5], options=self._default_options(), expected_logs=expected_logs, tool=mock_tool)
+self.assert_execute_outputs(LandUnsafe(), [5], options=self._default_options(), expected_logs=expected_logs, tool=mock_tool)
 
 def test_check_style(self):
 expected_logs = """Processing 1 patch from 1 bug.
@@ -211,7 +211,7 @@
 with self.mock_svn_remote():
 options = self._default_options()
 options.comment_bug = False
-self.assert_execute_outputs(Land(), [5], options=options, expected_logs=expected_logs)
+self.assert_execute_outputs(LandUnsafe(), [5], options=options, expected_logs=expected_logs)
 
 def test_land_no_close(self):
 expected_logs = """Building WebKit
@@ -226,7 +226,7 @@
 with self.mock_svn_remote():
 options = self._default_options()
 options.close_bug = False
-self.assert_execute_outputs(Land(), [5], options=options, expected_logs=expected_logs)
+self.assert_execute_outputs(LandUnsafe(), [5], options=options, expected_logs=expected_logs)
 
 def test_land_no_comment_no_close(self):
 expected_logs = """Building WebKit
@@ -237,7 +237,7 @@
 options = self._default_options()
 options.comment_bug = False
 options.close_bug 

[webkit-changes] [293423] trunk/Tools

2022-04-26 Thread jbedard
Title: [293423] trunk/Tools








Revision 293423
Author jbed...@apple.com
Date 2022-04-26 07:28:49 -0700 (Tue, 26 Apr 2022)


Log Message
[ews-build.webkit.org] Specify repository when sending emails
https://bugs.webkit.org/show_bug.cgi?id=239739


Reviewed by Aakash Jain.

* Tools/CISupport/ews-build/steps.py:
(GitHubMixin.should_send_email_for_pr): Pass repository URL.
(AnalyzeCompileWebKitResults.send_email_for_new_build_failure): Ditto.
(AnalyzeLayoutTestsResults.send_email_for_new_test_failures): Ditto.

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

Modified Paths

trunk/Tools/CISupport/ews-build/steps.py
trunk/Tools/ChangeLog




Diff

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

--- trunk/Tools/CISupport/ews-build/steps.py	2022-04-26 11:01:12 UTC (rev 293422)
+++ trunk/Tools/CISupport/ews-build/steps.py	2022-04-26 14:28:49 UTC (rev 293423)
@@ -238,8 +238,8 @@
 return 1
 return 0
 
-def should_send_email_for_pr(self, pr_number):
-pr_json = self.get_pr_json(pr_number)
+def should_send_email_for_pr(self, pr_number, repository_url=None):
+pr_json = self.get_pr_json(pr_number, repository_url=repository_url)
 if not pr_json:
 return True
 
@@ -2512,7 +2512,7 @@
 
 if patch_id and not self.should_send_email_for_patch(patch_id):
 return
-if pr_number and not self.should_send_email_for_pr(pr_number):
+if pr_number and not self.should_send_email_for_pr(pr_number, self.getProperty('repository')):
 return
 if not patch_id and not (pr_number and sha):
 self._addToLog('stderr', 'Unrecognized change type')
@@ -3355,7 +3355,7 @@
 
 if patch_id and not self.should_send_email_for_patch(patch_id):
 return
-if pr_number and not self.should_send_email_for_pr(pr_number):
+if pr_number and not self.should_send_email_for_pr(pr_number, self.getProperty('repository')):
 return
 if not patch_id and not (pr_number and sha):
 self._addToLog('stderr', 'Unrecognized change type')


Modified: trunk/Tools/ChangeLog (293422 => 293423)

--- trunk/Tools/ChangeLog	2022-04-26 11:01:12 UTC (rev 293422)
+++ trunk/Tools/ChangeLog	2022-04-26 14:28:49 UTC (rev 293423)
@@ -1,3 +1,16 @@
+2022-04-25  Jonathan Bedard  
+
+[ews-build.webkit.org] Specify repository when sending emails
+https://bugs.webkit.org/show_bug.cgi?id=239739
+
+
+Reviewed by Aakash Jain.
+
+* CISupport/ews-build/steps.py:
+(GitHubMixin.should_send_email_for_pr): Pass repository URL.
+(AnalyzeCompileWebKitResults.send_email_for_new_build_failure): Ditto.
+(AnalyzeLayoutTestsResults.send_email_for_new_test_failures): Ditto.
+
 2022-04-25  Aditya Keerthi  
 
 [iOS] Add NSCoding support for findInteractionEnabled






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [293382] trunk/Tools

2022-04-25 Thread jbedard
Title: [293382] trunk/Tools








Revision 293382
Author jbed...@apple.com
Date 2022-04-25 17:25:27 -0700 (Mon, 25 Apr 2022)


Log Message
[Merge-Queue] Differentiate gardening commits in bug comments
https://bugs.webkit.org/show_bug.cgi?id=239740


Reviewed by Ryan Haddad.

* Tools/CISupport/ews-build/steps.py:
(DetermineLandedIdentifier.comment_text_for_bug):
* Tools/CISupport/ews-build/steps_unittest.py:

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

Modified Paths

trunk/Tools/CISupport/ews-build/steps.py
trunk/Tools/CISupport/ews-build/steps_unittest.py
trunk/Tools/ChangeLog




Diff

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

--- trunk/Tools/CISupport/ews-build/steps.py	2022-04-26 00:21:34 UTC (rev 293381)
+++ trunk/Tools/CISupport/ews-build/steps.py	2022-04-26 00:25:27 UTC (rev 293382)
@@ -4656,7 +4656,10 @@
 
 def comment_text_for_bug(self, svn_revision=None, identifier=None):
 identifier_str = identifier if identifier and '@' in identifier else '?'
-comment = 'Committed r{} ({}): <{}>'.format(svn_revision, identifier_str, self.url_for_identifier(identifier))
+comment = '{} r{} ({}): <{}>'.format(
+'Test gardening commit' if self.getProperty('is_test_gardening') else 'Committed',
+svn_revision, identifier_str, self.url_for_identifier(identifier),
+)
 
 patch_id = self.getProperty('patch_id', '')
 if patch_id:


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

--- trunk/Tools/CISupport/ews-build/steps_unittest.py	2022-04-26 00:21:34 UTC (rev 293381)
+++ trunk/Tools/CISupport/ews-build/steps_unittest.py	2022-04-26 00:25:27 UTC (rev 293382)
@@ -5495,6 +5495,42 @@
 self.assertEqual(self.getProperty('build_summary'), 'Committed 220797@main')
 return rc
 
+def test_success_gardening_pr(self):
+with self.mock_commits_webkit_org(), self.mock_sleep():
+self.setupStep(DetermineLandedIdentifier())
+self.setProperty('svn_revision', '293254')
+self.setProperty('github.number', '1234')
+self.setProperty('is_test_gardening', True)
+self.expectRemoteCommands(
+ExpectShell(workdir='wkdir',
+timeout=300,
+logEnviron=False,
+command=['git', 'log', '-1', '--no-decorate']) +
+ExpectShell.log('stdio', stdout=commit 5dc27962b4c5bdfd17d17faa785f70abbb0550ed
+Author: Matteo Flores 
+Date:   Fri Apr 22 21:24:12 2022 +
+
+REBASLINE: [ Monterey ] fast/text/khmer-lao-font.html is a constant text failure
+
+https://bugs.webkit.org/show_bug.cgi?id=238917
+
+Unreviewed test gardening.
+
+* platform/mac-bigsur/fast/text/khmer-lao-font-expected.txt: Copied from LayoutTests/platform/mac/fast/text/khmer-lao-font-expected.txt.
+* platform/mac/fast/text/khmer-lao-font-expected.txt:
+
+Canonical link: https://commits.webkit.org/249903@main
+git-svn-id: https://svn.webkit.org/repository/webkit/trunk@293254 268f45cc-cd09-0410-ab3c-d52691b4dbfc''') +
+0,
+)
+self.expectOutcome(result=SUCCESS, state_string='Identifier: 249903@main')
+with current_hostname(EWS_BUILD_HOSTNAME):
+rc = self.runStep()
+
+self.assertEqual(self.getProperty('comment_text'), 'Test gardening commit r293254 (249903@main): \n\nReviewed commits have been landed. Closing PR #1234 and removing active labels.')
+self.assertEqual(self.getProperty('build_summary'), 'Committed 249903@main')
+return rc
+
 def test_success_pr_fallback(self):
 with self.mock_commits_webkit_org(identifier='220797@main'), self.mock_sleep():
 self.setupStep(DetermineLandedIdentifier())


Modified: trunk/Tools/ChangeLog (293381 => 293382)

--- trunk/Tools/ChangeLog	2022-04-26 00:21:34 UTC (rev 293381)
+++ trunk/Tools/ChangeLog	2022-04-26 00:25:27 UTC (rev 293382)
@@ -1,5 +1,17 @@
 2022-04-25  Jonathan Bedard  
 
+[Merge-Queue] Differentiate gardening commits in bug comments
+https://bugs.webkit.org/show_bug.cgi?id=239740
+
+
+Reviewed by Ryan Haddad.
+
+* CISupport/ews-build/steps.py:
+(DetermineLandedIdentifier.comment_text_for_bug):
+* CISupport/ews-build/steps_unittest.py:
+
+2022-04-25  Jonathan Bedard  
+
 GitHub EWS is confused with prior PR's merge-blocked label
 https://bugs.webkit.org/show_bug.cgi?id=239411
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [293381] trunk/Tools

2022-04-25 Thread jbedard
Title: [293381] trunk/Tools








Revision 293381
Author jbed...@apple.com
Date 2022-04-25 17:21:34 -0700 (Mon, 25 Apr 2022)


Log Message
GitHub EWS is confused with prior PR's merge-blocked label
https://bugs.webkit.org/show_bug.cgi?id=239411


Reviewed by Aakash Jain.

* Tools/CISupport/ews-build/steps.py:
(BlockPullRequest.start): Only apply blocked label if tested hash and current hash match.

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

Modified Paths

trunk/Tools/CISupport/ews-build/steps.py
trunk/Tools/ChangeLog




Diff

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

--- trunk/Tools/CISupport/ews-build/steps.py	2022-04-26 00:16:10 UTC (rev 293380)
+++ trunk/Tools/CISupport/ews-build/steps.py	2022-04-26 00:21:34 UTC (rev 293381)
@@ -1671,7 +1671,10 @@
 build_finish_summary = self.getProperty('build_finish_summary', None)
 
 rc = SKIPPED
-if CURRENT_HOSTNAME == EWS_BUILD_HOSTNAME:
+repository_url = self.getProperty('repository', '')
+pr_json = self.get_pr_json(pr_number, repository_url)
+
+if self._is_hash_outdated(pr_json) == 0 and CURRENT_HOSTNAME == EWS_BUILD_HOSTNAME:
 repository_url = self.getProperty('repository', '')
 rc = SUCCESS
 if any((


Modified: trunk/Tools/ChangeLog (293380 => 293381)

--- trunk/Tools/ChangeLog	2022-04-26 00:16:10 UTC (rev 293380)
+++ trunk/Tools/ChangeLog	2022-04-26 00:21:34 UTC (rev 293381)
@@ -1,5 +1,16 @@
 2022-04-25  Jonathan Bedard  
 
+GitHub EWS is confused with prior PR's merge-blocked label
+https://bugs.webkit.org/show_bug.cgi?id=239411
+
+
+Reviewed by Aakash Jain.
+
+* CISupport/ews-build/steps.py:
+(BlockPullRequest.start): Only apply blocked label if tested hash and current hash match.
+
+2022-04-25  Jonathan Bedard  
+
 [build.webkit.org] Use GitHub checkouts (Follow-up)
 https://bugs.webkit.org/show_bug.cgi?id=239072
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [293331] trunk/Tools

2022-04-25 Thread jbedard
Title: [293331] trunk/Tools








Revision 293331
Author jbed...@apple.com
Date 2022-04-25 10:58:13 -0700 (Mon, 25 Apr 2022)


Log Message
[build.webkit.org] Use GitHub checkouts (Follow-up)
https://bugs.webkit.org/show_bug.cgi?id=239072


Unreviewed follow-up fix.

* Tools/CISupport/build-webkit-org/steps.py:
(CheckOutSource.__init__): Use the specified commit, not the latest.

Modified Paths

trunk/Tools/CISupport/build-webkit-org/steps.py
trunk/Tools/ChangeLog




Diff

Modified: trunk/Tools/CISupport/build-webkit-org/steps.py (293330 => 293331)

--- trunk/Tools/CISupport/build-webkit-org/steps.py	2022-04-25 16:41:17 UTC (rev 293330)
+++ trunk/Tools/CISupport/build-webkit-org/steps.py	2022-04-25 17:58:13 UTC (rev 293331)
@@ -137,7 +137,6 @@
 super(CheckOutSource, self).__init__(repourl=repourl,
  retry=self.CHECKOUT_DELAY_AND_MAX_RETRIES_PAIR,
  timeout=2 * 60 * 60,
- alwaysUseLatest=True,
  logEnviron=False,
  method='clean',
  progress=True,


Modified: trunk/Tools/ChangeLog (293330 => 293331)

--- trunk/Tools/ChangeLog	2022-04-25 16:41:17 UTC (rev 293330)
+++ trunk/Tools/ChangeLog	2022-04-25 17:58:13 UTC (rev 293331)
@@ -1,3 +1,14 @@
+2022-04-25  Jonathan Bedard  
+
+[build.webkit.org] Use GitHub checkouts (Follow-up)
+https://bugs.webkit.org/show_bug.cgi?id=239072
+
+
+Unreviewed follow-up fix.
+
+* CISupport/build-webkit-org/steps.py:
+(CheckOutSource.__init__): Use the specified commit, not the latest.
+
 2022-04-21  Jonathan Bedard  
 
 [ews-build.webkit.org] Support alternative remotes






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [293327] trunk/Tools

2022-04-25 Thread jbedard
Title: [293327] trunk/Tools








Revision 293327
Author jbed...@apple.com
Date 2022-04-25 08:25:37 -0700 (Mon, 25 Apr 2022)


Log Message
[ews-build.webkit.org] Support alternative remotes
https://bugs.webkit.org/show_bug.cgi?id=239617


Reviewed by Aakash Jain.

* Tools/CISupport/ews-build/events.py:
(GitHubEventHandlerNoEdits):
(GitHubEventHandlerNoEdits.extractProperties): Remove sensative fields from non-public
pull requests.
(GitHubEventHandlerNoEdits.handle_pull_request): Generalize label process sleep.
* Tools/CISupport/ews-build/steps.py:
(CheckOutPullRequest.run): Checkout with EWS credentials.
* Tools/CISupport/ews-build/steps_unittest.py:

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

Modified Paths

trunk/Tools/CISupport/ews-build/events.py
trunk/Tools/CISupport/ews-build/steps.py
trunk/Tools/CISupport/ews-build/steps_unittest.py
trunk/Tools/ChangeLog




Diff

Modified: trunk/Tools/CISupport/ews-build/events.py (293326 => 293327)

--- trunk/Tools/CISupport/ews-build/events.py	2022-04-25 15:25:06 UTC (rev 293326)
+++ trunk/Tools/CISupport/ews-build/events.py	2022-04-25 15:25:37 UTC (rev 293327)
@@ -324,8 +324,11 @@
 
 class GitHubEventHandlerNoEdits(GitHubEventHandler):
 OPEN_STATES = ('open',)
+PUBLIC_REPOS = ('WebKit/WebKit',)
+SENSATIVE_FIELDS = ('github.title',)
 UNSAFE_MERGE_QUEUE_LABEL = 'unsafe-merge-queue'
 MERGE_QUEUE_LABEL = 'merge-queue'
+LABEL_PROCESS_DELAY = 10
 
 @classmethod
 def file_with_status_sign(cls, info):
@@ -359,6 +362,14 @@
 log.msg('Failed fetching PR files: response code {}'.format(res.code))
 return []
 
+def extractProperties(self, payload):
+result = super(GitHubEventHandlerNoEdits, self).extractProperties(payload)
+if result.get('project') not in self.PUBLIC_REPOS:
+for field in self.SENSATIVE_FIELDS:
+if field in result:
+del result[field]
+return result
+
 def handle_pull_request(self, payload, event):
 pr_number = payload['number']
 action = ""
@@ -373,12 +384,13 @@
 log.msg("PR #{} was labeled for unsafe-merge-queue".format(pr_number))
 # 'labeled' is usually an ignored action, override it to force build
 payload['action'] = 'synchronize'
+time.sleep(self.LABEL_PROCESS_DELAY)
 return super(GitHubEventHandlerNoEdits, self).handle_pull_request(payload, 'unsafe_merge_queue')
 if action == 'labeled' and self.MERGE_QUEUE_LABEL in labels:
 log.msg("PR #{} was labeled for merge-queue".format(pr_number))
 # 'labeled' is usually an ignored action, override it to force build
 payload['action'] = 'synchronize'
-time.sleep(10)
+time.sleep(self.LABEL_PROCESS_DELAY)
 return super(GitHubEventHandlerNoEdits, self).handle_pull_request(payload, 'merge_queue')
 
 return super(GitHubEventHandlerNoEdits, self).handle_pull_request(payload, event)


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

--- trunk/Tools/CISupport/ews-build/steps.py	2022-04-25 15:25:06 UTC (rev 293326)
+++ trunk/Tools/CISupport/ews-build/steps.py	2022-04-25 15:25:37 UTC (rev 293327)
@@ -57,7 +57,7 @@
 WithProperties = properties.WithProperties
 Interpolate = properties.Interpolate
 GITHUB_URL = 'https://github.com/'
-GITHUB_PROJECTS = ['WebKit/WebKit']
+GITHUB_PROJECTS = ['WebKit/WebKit', 'apple/WebKit']
 HASH_LENGTH_TO_DISPLAY = 8
 DEFAULT_BRANCH = 'main'
 
@@ -829,10 +829,6 @@
 description = ['checking-out-pull-request']
 descriptionDone = ['Checked out pull request']
 haltOnFailure = True
-env = dict(
-GIT_COMMITTER_NAME='EWS',
-GIT_COMMITTER_EMAIL=FROM_EMAIL,
-)
 
 def __init__(self, **kwargs):
 super(CheckOutPullRequest, self).__init__(timeout=10 * 60, logEnviron=False, **kwargs)
@@ -868,6 +864,14 @@
 for command in commands:
 self.commands.append(util.ShellArg(command=command, logname='stdio', haltOnFailure=True))
 
+username, access_token = GitHub.credentials()
+self.env = dict(
+GIT_COMMITTER_NAME='EWS',
+GIT_COMMITTER_EMAIL=FROM_EMAIL,
+GIT_USER=username,
+GIT_PASSWORD=access_token,
+)
+
 return super(CheckOutPullRequest, self).run()
 
 def getResultSummary(self):


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

--- trunk/Tools/CISupport/ews-build/steps_unittest.py	2022-04-25 15:25:06 UTC (rev 293326)
+++ trunk/Tools/CISupport/ews-build/steps_unittest.py	2022-04-25 15:25:37 UTC (rev 293327)
@@ -3231,6 +3231,8 @@
 ENV = dict(
 GIT_COMMITTER_NAME='EWS',
 GIT_COMMITTER_EMAIL='e...@webkit.org',
+GIT_USER=None,
+GIT_PASSWORD=None,
 )
 
 def setUp(self):


Modified: trunk/Tools/ChangeLog (293326 => 293327)

--- trunk/Tools/ChangeLog	2022-04-25 15:25:06 UTC 

[webkit-changes] [293323] trunk/Tools

2022-04-25 Thread jbedard
Title: [293323] trunk/Tools








Revision 293323
Author jbed...@apple.com
Date 2022-04-25 06:31:31 -0700 (Mon, 25 Apr 2022)


Log Message
[build.webkit.org] Use GitHub checkouts
https://bugs.webkit.org/show_bug.cgi?id=239072


Reviewed by Ryan Haddad.

* Tools/CISupport/build-webkit-org/config.json: Convert schedulers to GitHub based branch names.
* Tools/CISupport/build-webkit-org/loadConfig.py: Ditto.
* Tools/CISupport/build-webkit-org/master.cfg: Enable incoming hooks from GitHub.
(load_password): Added.
* Tools/CISupport/build-webkit-org/steps.py:
(CheckOutSource): Replace with GitHub based checkout.
(CleanUpGitIndexLock): Replaced SVNCleanup.
(SVNCleanup): Replace with CleanUpGitIndexLock.
(ShowIdentifier.start): `got_revision` will bet hash, not subversion revision.
* Tools/CISupport/build-webkit-org/steps_unittest.py:
(TestShowIdentifier.test_success):
(TestShowIdentifier.test_failure):

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

Modified Paths

trunk/Tools/CISupport/build-webkit-org/config.json
trunk/Tools/CISupport/build-webkit-org/loadConfig.py
trunk/Tools/CISupport/build-webkit-org/master.cfg
trunk/Tools/CISupport/build-webkit-org/steps.py
trunk/Tools/CISupport/build-webkit-org/steps_unittest.py
trunk/Tools/ChangeLog




Diff

Modified: trunk/Tools/CISupport/build-webkit-org/config.json (293322 => 293323)

--- trunk/Tools/CISupport/build-webkit-org/config.json	2022-04-25 13:06:15 UTC (rev 293322)
+++ trunk/Tools/CISupport/build-webkit-org/config.json	2022-04-25 13:31:31 UTC (rev 293323)
@@ -614,7 +614,7 @@
 }
   ],
 
-"schedulers": [ { "type": "AnyBranchScheduler", "name": "trunk", "change_filter": "trunk_filter", "treeStableTimer": 45.0,
+"schedulers": [ { "type": "AnyBranchScheduler", "name": "main", "change_filter": "main_filter", "treeStableTimer": 45.0,
   "builderNames": ["GTK-Linux-64-bit-Release-Build", "GTK-Linux-64-bit-Debug-Build",
"GTK-Linux-64-bit-Release-Clang",
"GTK-Linux-64-bit-Release-Debian-Stable-Build",
@@ -627,7 +627,8 @@
"WPE-Linux-64-bit-Release-Build", "WPE-Linux-64-bit-Debug-Build",
"WPE-Linux-64-bit-Release-Non-Unified-Build"]
 },
-{ "type": "PlatformSpecificScheduler", "platform": "mac-monterey", "branch": "trunk", "treeStableTimer": 45.0,
+
+{ "type": "PlatformSpecificScheduler", "platform": "mac-monterey", "branch": "main", "treeStableTimer": 45.0,
   "builderNames": ["Apple-Monterey-Release-Build", "Apple-Monterey-Debug-Build"]
 },
 { "type": "Triggerable", "name": "monterey-release-tests-wk1",
@@ -669,7 +670,7 @@
 { "type": "Triggerable", "name": "monterey-applesilicon-release-tests-jsc",
   "builderNames": ["Apple-Monterey-AppleSilicon-Release-JSC-Tests"]
 },
-{ "type": "PlatformSpecificScheduler", "platform": "mac-bigsur", "branch": "trunk", "treeStableTimer": 45.0,
+{ "type": "PlatformSpecificScheduler", "platform": "mac-bigsur", "branch": "main", "treeStableTimer": 45.0,
   "builderNames": ["Apple-BigSur-Release-Build", "Apple-BigSur-Debug-Build", "Apple-BigSur-LLINT-CLoop-BuildAndTest", "Apple-BigSur-XCBuild-Release-Build"]
 },
 { "type": "Triggerable", "name": "bigsur-release-tests-jsc",
@@ -711,25 +712,25 @@
 { "type": "Triggerable", "name": "bigsur-debug-tests-wk2-gpuprocess",
   "builderNames": ["Apple-BigSur-Debug-WK2-GPUProcess-Tests"]
 },
-{ "type": "PlatformSpecificScheduler", "platform": "ios-15", "branch": "trunk", "treeStableTimer": 45.0,
+{ "type": "PlatformSpecificScheduler", "platform": "ios-15", "branch": "main", "treeStableTimer": 45.0,
   "builderNames": ["Apple-iOS-15-Release-Build"]
 },
-{ "type": "PlatformSpecificScheduler", "platform": "ios-simulator-15", "branch": "trunk", "treeStableTimer": 45.0,
+{ "type": "PlatformSpecificScheduler", "platform": "ios-simulator-15", "branch": "main", "treeStableTimer": 45.0,
   "builderNames": ["Apple-iOS-15-Simulator-Release-Build", "Apple-iOS-15-Simulator-Debug-Build"]
 },
-{ "type": "PlatformSpecificScheduler", "platform": "tvos-15", "branch": "trunk", "treeStableTimer": 45.0,
+{ "type": "PlatformSpecificScheduler", "platform": "tvos-15", "branch": "main", "treeStableTimer": 45.0,
   "builderNames": ["Apple-tvOS-15-Release-Build"]
 },
-{ "type": "PlatformSpecificScheduler", 

[webkit-changes] [293187] trunk/Tools

2022-04-21 Thread jbedard
Title: [293187] trunk/Tools








Revision 293187
Author jbed...@apple.com
Date 2022-04-21 13:57:31 -0700 (Thu, 21 Apr 2022)


Log Message
[git-webkit] Allow caller to specify remote for PR
https://bugs.webkit.org/show_bug.cgi?id=239452


Reviewed by Dewei Zhu.

* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
(Git.__init__): Allow caller to define remotes.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:
(PullRequest.parser): Add '--remote' option.
(PullRequest.main): Allow options to specify the remote we're making a PR against.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/revert.py:
(Revert.add_comment_to_reverted_commit_bug_tracker): Derive remote from argument.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py:
(GitHub.PRGenerator.find): Support finding PRs if label doesn't contain username.
(GitHub.PRGenerator.create): Error 422 is a validation error, usually caused by another PR pointing to the same branch.
(GitHub.PRGenerator.update): Extract error message for more actionable errors.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/clean_unittest.py:
(TestClean.test_clean_pr): Add fork remote.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/revert_unittest.py:

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

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/revert.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/clean_unittest.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/revert_unittest.py




Diff

Modified: trunk/Tools/ChangeLog (293186 => 293187)

--- trunk/Tools/ChangeLog	2022-04-21 20:51:37 UTC (rev 293186)
+++ trunk/Tools/ChangeLog	2022-04-21 20:57:31 UTC (rev 293187)
@@ -1,5 +1,31 @@
 2022-04-21  Jonathan Bedard  
 
+[git-webkit] Allow caller to specify remote for PR
+https://bugs.webkit.org/show_bug.cgi?id=239452
+
+
+Reviewed by Dewei Zhu.
+
+* Scripts/libraries/webkitscmpy/setup.py: Bump version.
+* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
+* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
+(Git.__init__): Allow caller to define remotes.
+* Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:
+(PullRequest.parser): Add '--remote' option.
+(PullRequest.main): Allow options to specify the remote we're making a PR against.
+* Scripts/libraries/webkitscmpy/webkitscmpy/program/revert.py:
+(Revert.add_comment_to_reverted_commit_bug_tracker): Derive remote from argument.
+* Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py:
+(GitHub.PRGenerator.find): Support finding PRs if label doesn't contain username.
+(GitHub.PRGenerator.create): Error 422 is a validation error, usually caused by another PR pointing to the same branch.
+(GitHub.PRGenerator.update): Extract error message for more actionable errors.
+* Scripts/libraries/webkitscmpy/webkitscmpy/test/clean_unittest.py:
+(TestClean.test_clean_pr): Add fork remote.
+* Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:
+* Scripts/libraries/webkitscmpy/webkitscmpy/test/revert_unittest.py:
+
+2022-04-21  Jonathan Bedard  
+
 [Merge-Queue] Don't close bugs associated with test gardening
 https://bugs.webkit.org/show_bug.cgi?id=239604
 


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (293186 => 293187)

--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-04-21 20:51:37 UTC (rev 293186)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-04-21 20:57:31 UTC (rev 293187)
@@ -29,7 +29,7 @@
 
 setup(
 name='webkitscmpy',
-version='4.11.0',
+version='4.11.1',
 description='Library designed to interact with git and svn repositories.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (293186 => 293187)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-04-21 20:51:37 UTC (rev 293186)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-04-21 20:57:31 UTC (rev 293187)
@@ -46,7 +46,7 @@
 "Please install 

[webkit-changes] [293174] trunk/Tools

2022-04-21 Thread jbedard
Title: [293174] trunk/Tools








Revision 293174
Author jbed...@apple.com
Date 2022-04-21 10:10:24 -0700 (Thu, 21 Apr 2022)


Log Message
[Merge-Queue] Don't close bugs associated with test gardening
https://bugs.webkit.org/show_bug.cgi?id=239604


Reviewed by Ryan Haddad.

* Tools/CISupport/ews-build/steps.py:
(CloseBug.doStepIf): Skip step if we're a test gardening change.
(UpdatePullRequest):
(UpdatePullRequest.is_test_gardening): Check for "Unreviewed test gardening" in the commit message.
(UpdatePullRequest.evaluateCommand):
* Tools/CISupport/ews-build/steps_unittest.py:

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

Modified Paths

trunk/Tools/CISupport/ews-build/steps.py
trunk/Tools/CISupport/ews-build/steps_unittest.py
trunk/Tools/ChangeLog




Diff

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

--- trunk/Tools/CISupport/ews-build/steps.py	2022-04-21 16:55:46 UTC (rev 293173)
+++ trunk/Tools/CISupport/ews-build/steps.py	2022-04-21 17:10:24 UTC (rev 293174)
@@ -1779,7 +1779,7 @@
 return {'step': 'Failed to close bug {}'.format(self.bug_id)}
 
 def doStepIf(self, step):
-return self.getProperty('bug_id')
+return self.getProperty('bug_id') and not self.getProperty('is_test_gardening')
 
 def hideStepIf(self, results, step):
 return not self.doStepIf(step)
@@ -5125,6 +5125,13 @@
 return match.group('id')
 return None
 
+@classmethod
+def is_test_gardening(cls, lines):
+for line in lines:
+if line.lstrip().startswith('Unreviewed test gardening'):
+return True
+return False
+
 def evaluateCommand(self, cmd):
 rc = super(UpdatePullRequest, self).evaluateCommand(cmd)
 
@@ -5139,6 +5146,7 @@
 bug_id = self.bug_id_from_log(loglines)
 if bug_id:
 self.setProperty('bug_id', bug_id)
+self.setProperty('is_test_gardening', self.is_test_gardening(loglines))
 
 user = self.getProperty('github.head.user.login', '')
 head = self.getProperty('github.head.ref', '')


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

--- trunk/Tools/CISupport/ews-build/steps_unittest.py	2022-04-21 16:55:46 UTC (rev 293173)
+++ trunk/Tools/CISupport/ews-build/steps_unittest.py	2022-04-21 17:10:24 UTC (rev 293174)
@@ -6420,7 +6420,7 @@
 self.assertEqual(pr_number, '1234')
 self.assertEqual(title, '[Merge-Queue] Add http credential helper')
 self.assertEqual(base, 'main')
-self.assertEqual(head, 'HEAD:eng/pull-request-branch')
+self.assertEqual(head, 'JonWBedard:eng/pull-request-branch')
 
 self.assertEqual(
 description,
@@ -6476,10 +6476,71 @@
 )
 self.expectOutcome(result=SUCCESS, state_string='Updated pull request')
 with current_hostname(EWS_BUILD_HOSTNAME):
-return self.runStep()
+rc = self.runStep()
+self.assertEqual(self.getProperty('bug_id'), '238553')
+self.assertEqual(self.getProperty('is_test_gardening'), False)
+return rc
 
-def test_success(self):
+def test_success_gardening(self):
 def update_pr(x, pr_number, title, description, base=None, head=None, repository_url=None):
+self.assertEqual(pr_number, '1234')
+self.assertEqual(title, '[ macOS wk2 ] some/test/path.html a flaky failure')
+self.assertEqual(base, 'main')
+self.assertEqual(head, 'karlrackler:eng/pull-request-branch')
+
+self.assertEqual(
+description,
+''' 6a50b47fd71d922f753c06f46917086c839520b
+
+[ macOS wk2 ] some/test/path.html a flaky failure
+
+''',
+)
+
+return True
+
+UpdatePullRequest.update_pr = update_pr
+self.setupStep(UpdatePullRequest())
+self.setProperty('github.number', '1234')
+self.setProperty('github.head.user.login', 'karlrackler')
+self.setProperty('github.head.ref', 'eng/pull-request-branch')
+self.setProperty('github.base.ref', 'main')
+self.expectRemoteCommands(
+ExpectShell(workdir='wkdir',
+logEnviron=False,
+timeout=300,
+command=['git', 'log', '-1', '--no-decorate'])
++ 0
++ ExpectShell.log('stdio', stdout='''commit 6a50b47fd71d922f753c06f46917086c839520b
+Author: Karl Rackler 
+Date:   Thu Apr 21 00:25:03 2022 +
+
+[ macOS wk2 ] some/test/path.html a flaky failure
+https://bugs.webkit.org/show_bug.cgi?id=239577
+
+Unreviewed test gardening.
+
+* LayoutTests/platform/mac-wk2/TestExpectations:
+
+Canonical link: https://commits.webkit.org/249833@main
+'''),
+)
+self.expectOutcome(result=SUCCESS, state_string='Updated pull request')
+with current_hostname(EWS_BUILD_HOSTNAME):

[webkit-changes] [293172] trunk/Tools

2022-04-21 Thread jbedard
Title: [293172] trunk/Tools








Revision 293172
Author jbed...@apple.com
Date 2022-04-21 09:28:29 -0700 (Thu, 21 Apr 2022)


Log Message
[commits.webkit.org] Disable CORS
https://bugs.webkit.org/show_bug.cgi?id=239607

Reviewed by Aakash Jain.

* Tools/Scripts/libraries/reporelaypy/reporelaypy/__init__.py: Bump version.
* Tools/Scripts/libraries/reporelaypy/reporelaypy/webserver.py: Disable CORS.
* Tools/Scripts/libraries/reporelaypy/setup.py: Bump version.

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

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/reporelaypy/reporelaypy/__init__.py
trunk/Tools/Scripts/libraries/reporelaypy/reporelaypy/webserver.py
trunk/Tools/Scripts/libraries/reporelaypy/setup.py




Diff

Modified: trunk/Tools/ChangeLog (293171 => 293172)

--- trunk/Tools/ChangeLog	2022-04-21 16:28:02 UTC (rev 293171)
+++ trunk/Tools/ChangeLog	2022-04-21 16:28:29 UTC (rev 293172)
@@ -1,5 +1,16 @@
 2022-04-21  Jonathan Bedard  
 
+[commits.webkit.org] Disable CORS
+https://bugs.webkit.org/show_bug.cgi?id=239607
+
+Reviewed by Aakash Jain.
+
+* Scripts/libraries/reporelaypy/reporelaypy/__init__.py: Bump version.
+* Scripts/libraries/reporelaypy/reporelaypy/webserver.py: Disable CORS.
+* Scripts/libraries/reporelaypy/setup.py: Bump version.
+
+2022-04-21  Jonathan Bedard  
+
 [Merge-Queue] Allow "Rubber-stamped" as review message
 https://bugs.webkit.org/show_bug.cgi?id=239601
 


Modified: trunk/Tools/Scripts/libraries/reporelaypy/reporelaypy/__init__.py (293171 => 293172)

--- trunk/Tools/Scripts/libraries/reporelaypy/reporelaypy/__init__.py	2022-04-21 16:28:02 UTC (rev 293171)
+++ trunk/Tools/Scripts/libraries/reporelaypy/reporelaypy/__init__.py	2022-04-21 16:28:29 UTC (rev 293172)
@@ -44,7 +44,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(0, 5, 0)
+version = Version(0, 5, 1)
 
 import webkitflaskpy
 


Modified: trunk/Tools/Scripts/libraries/reporelaypy/reporelaypy/webserver.py (293171 => 293172)

--- trunk/Tools/Scripts/libraries/reporelaypy/reporelaypy/webserver.py	2022-04-21 16:28:02 UTC (rev 293171)
+++ trunk/Tools/Scripts/libraries/reporelaypy/reporelaypy/webserver.py	2022-04-21 16:28:29 UTC (rev 293172)
@@ -23,6 +23,8 @@
 import json
 import os
 
+from flask_cors import CORS
+
 autoinstall_path = os.environ.get('AUTOINSTALL_PATH')
 if autoinstall_path:
 from webkitcorepy import AutoInstall
@@ -32,6 +34,7 @@
 from reporelaypy import Checkout, CheckoutRoute, Database, Redirector, HookReceiver
 
 app = Flask(__name__)
+CORS(app)
 
 database = Database()
 checkout = Checkout.from_json(os.environ.get('CHECKOUT', '{}'))


Modified: trunk/Tools/Scripts/libraries/reporelaypy/setup.py (293171 => 293172)

--- trunk/Tools/Scripts/libraries/reporelaypy/setup.py	2022-04-21 16:28:02 UTC (rev 293171)
+++ trunk/Tools/Scripts/libraries/reporelaypy/setup.py	2022-04-21 16:28:29 UTC (rev 293172)
@@ -30,7 +30,7 @@
 
 setup(
 name='reporelaypy',
-version='0.5.0',
+version='0.5.1',
 description='Library for visualizing, processing and storing test results.',
 long_description=readme(),
 classifiers=[






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [293168] trunk/Tools

2022-04-21 Thread jbedard
Title: [293168] trunk/Tools








Revision 293168
Author jbed...@apple.com
Date 2022-04-21 07:46:19 -0700 (Thu, 21 Apr 2022)


Log Message
[Merge-Queue] Allow "Rubber-stamped" as review message
https://bugs.webkit.org/show_bug.cgi?id=239601


Reviewed by Aakash Jain.

* Tools/CISupport/ews-build/steps.py:
(ValidateCommitMessage.evaluateCommand): Allow "Rubber-stamped by."
* Tools/CISupport/ews-build/steps_unittest.py:

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

Modified Paths

trunk/Tools/CISupport/ews-build/steps.py
trunk/Tools/CISupport/ews-build/steps_unittest.py
trunk/Tools/ChangeLog




Diff

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

--- trunk/Tools/CISupport/ews-build/steps.py	2022-04-21 13:20:21 UTC (rev 293167)
+++ trunk/Tools/CISupport/ews-build/steps.py	2022-04-21 14:46:19 UTC (rev 293168)
@@ -4940,6 +4940,12 @@
 haltOnFailure = False
 flunkOnFailure = True
 OOPS_RE = re.compile(r'\(OO*PP*S!\)')
+REVIEWED_STRINGS = (
+'Reviewed by',
+'Unreviewed',
+'Rubber-stamped by',
+'Rubber stamped by',
+)
 
 def __init__(self, **kwargs):
 super(ValidateCommitMessage, self).__init__(logEnviron=False, timeout=60, **kwargs)
@@ -4971,9 +4977,10 @@
 if self.OOPS_RE.search(log_text):
 self.summary = 'Commit message contains (OOPS!)'
 rc = FAILURE
-elif 'Reviewed by' not in log_text and 'Unreviewed' not in log_text:
+elif all([candidate not in log_text for candidate in self.REVIEWED_STRINGS]):
 self.summary = 'No reviewer information in commit message'
 rc = FAILURE
+
 else:
 self.summary = 'Error parsing commit message'
 rc = FAILURE


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

--- trunk/Tools/CISupport/ews-build/steps_unittest.py	2022-04-21 13:20:21 UTC (rev 293167)
+++ trunk/Tools/CISupport/ews-build/steps_unittest.py	2022-04-21 14:46:19 UTC (rev 293168)
@@ -6189,6 +6189,26 @@
 self.expectOutcome(result=SUCCESS, state_string='Validated commit message')
 return self.runStep()
 
+def test_success_rubber_stamped(self):
+self.setupStep(ValidateCommitMessage())
+self.setProperty('github.number', '1234')
+self.setProperty('github.base.ref', 'main')
+self.setProperty('github.head.ref', 'eng/pull-request-branch')
+self.expectRemoteCommands(
+ExpectShell(workdir='wkdir',
+logEnviron=False,
+timeout=60,
+command=['git', 'log', 'eng/pull-request-branch', '^main'])
++ 0
++ ExpectShell.log('stdio', stdout='''[build.webkit.org] Support identifiers on dashboard
+https://bugs.webkit.org/show_bug.cgi?id=239473
+
+
+Rubber-stamped by Aakash Jain.'''),
+)
+self.expectOutcome(result=SUCCESS, state_string='Validated commit message')
+return self.runStep()
+
 def test_failure_oops(self):
 self.setupStep(ValidateCommitMessage())
 self.setProperty('github.number', '1234')


Modified: trunk/Tools/ChangeLog (293167 => 293168)

--- trunk/Tools/ChangeLog	2022-04-21 13:20:21 UTC (rev 293167)
+++ trunk/Tools/ChangeLog	2022-04-21 14:46:19 UTC (rev 293168)
@@ -1,3 +1,15 @@
+2022-04-21  Jonathan Bedard  
+
+[Merge-Queue] Allow "Rubber-stamped" as review message
+https://bugs.webkit.org/show_bug.cgi?id=239601
+
+
+Reviewed by Aakash Jain.
+
+* CISupport/ews-build/steps.py:
+(ValidateCommitMessage.evaluateCommand): Allow "Rubber-stamped by."
+* CISupport/ews-build/steps_unittest.py:
+
 2022-04-20  Jonathan Bedard  
 
 [build.webkit.org] Support identifiers on dashboard






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [293167] trunk/Tools

2022-04-21 Thread jbedard
Title: [293167] trunk/Tools








Revision 293167
Author jbed...@apple.com
Date 2022-04-21 06:20:21 -0700 (Thu, 21 Apr 2022)


Log Message
[build.webkit.org] Support identifiers on dashboard
https://bugs.webkit.org/show_bug.cgi?id=239473


Reviewed by Aakash Jain.

* Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/Buildbot.js:
(Buildbot.prototype.layoutTestResultsDirectoryURLForIteration): Remove leading r.
* Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/BuildbotIteration.js:
(BuildbotIteration.prototype.get buildURL): Request identifier.
* Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/Dashboard.js: OpenSource should be considered a git checkout.
* Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/Initialization.js: Add Commit interface.
* Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/Main.js: Kick off periodic commits.webkit.org refresh.
* Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/QueueView.js:
(QueueView.prototype._appendPendingRevisionCount): Use commit.webkit.org interface instead of trac.
(QueueView.prototype._formatRevisionForDisplay): Don't truncate identifiers.
* Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/tests/index.html: Import Commits.js.
* Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/tests/resources/MockCommits.js:
(MockCommits): Add mock commits.webkit.org interface.
* Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/tests/resources/tests.js:
(setup): Add commits.webkit.org interface.
(this.view._latestProductiveIteration):
* Tools/CISupport/build-webkit-org/public_html/dashboard/index.html:

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

Modified Paths

trunk/Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/Buildbot.js
trunk/Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/BuildbotIteration.js
trunk/Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/Dashboard.js
trunk/Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/Initialization.js
trunk/Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/Main.js
trunk/Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/QueueView.js
trunk/Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/tests/index.html
trunk/Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/tests/resources/tests.js
trunk/Tools/CISupport/build-webkit-org/public_html/dashboard/index.html
trunk/Tools/ChangeLog


Added Paths

trunk/Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/Commits.js
trunk/Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/tests/resources/MockCommits.js




Diff

Modified: trunk/Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/Buildbot.js (293166 => 293167)

--- trunk/Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/Buildbot.js	2022-04-21 12:14:17 UTC (rev 293166)
+++ trunk/Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/Buildbot.js	2022-04-21 13:20:21 UTC (rev 293167)
@@ -181,12 +181,12 @@
 
 layoutTestResultsDirectoryURLForIteration: function(iteration)
 {
-var underscoreSeparatedRevisions = "r";
+var underscoreSeparatedCommits = "";
 sortDictionariesByOrder(Dashboard.Repository).forEach(function(repository) {
 if (iteration.revision[repository.name]) {
-if (underscoreSeparatedRevisions.length > 1)
-underscoreSeparatedRevisions += "_";
-underscoreSeparatedRevisions += iteration.revision[repository.name];
+if (underscoreSeparatedCommits.length > 1)
+underscoreSeparatedCommits += "_";
+underscoreSeparatedCommits += iteration.revision[repository.name];
 }
 });
 var url = "" + "results/";
@@ -193,7 +193,7 @@
 if (this.baseURLForResults) {
 url = ""
 }
-return url + encodeURIComponent(iteration.queue.id) + "/" + encodeURIComponent(underscoreSeparatedRevisions + " (" + iteration.id + ")");
+return url + encodeURIComponent(iteration.queue.id) + "/" + encodeURIComponent(underscoreSeparatedCommits + " (" + iteration.id + ")");
 },
 
 layoutTestResultsURLForIteration: function(iteration)


Modified: trunk/Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/BuildbotIteration.js (293166 => 293167)

--- trunk/Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/BuildbotIteration.js	2022-04-21 12:14:17 UTC (rev 293166)
+++ trunk/Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/BuildbotIteration.js	2022-04-21 13:20:21 UTC (rev 293167)
@@ -196,7 +196,6 @@
 this.id = data.number;
 
 this.revision = {};
-var revisionProperty = data.properties.got_revision;
 var branches = this.queue.branches;
 
 for (var i = 0; i < branches.length; ++i) {
@@ -213,8 +212,10 @@

[webkit-changes] [293036] trunk

2022-04-19 Thread jbedard
Title: [293036] trunk








Revision 293036
Author jbed...@apple.com
Date 2022-04-19 13:36:24 -0700 (Tue, 19 Apr 2022)


Log Message
Correction to botwatcher github username to contributors json

Reviewed by Jonathan Bedard.

* metadata/contributors.json:

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

Modified Paths

trunk/ChangeLog
trunk/metadata/contributors.json




Diff

Modified: trunk/ChangeLog (293035 => 293036)

--- trunk/ChangeLog	2022-04-19 20:33:05 UTC (rev 293035)
+++ trunk/ChangeLog	2022-04-19 20:36:24 UTC (rev 293036)
@@ -1,3 +1,11 @@
+2022-04-19  Karl Rackler  
+
+Coreection to botwatcher github username to contributors json
+
+Reviewed by Jonathan Bedard.
+
+* metadata/contributors.json:
+
 2022-04-19  Dean Jackson  
 
 Adding GitHub username.


Modified: trunk/metadata/contributors.json (293035 => 293036)

--- trunk/metadata/contributors.json	2022-04-19 20:33:05 UTC (rev 293035)
+++ trunk/metadata/contributors.json	2022-04-19 20:36:24 UTC (rev 293036)
@@ -3921,7 +3921,7 @@
   "emails" : [
  "rack...@apple.com"
   ],
-  "github" : "KarlRackler",
+  "github" : "karlrackler",
   "name" : "Karl Rackler",
   "status" : "committer"
},






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [293034] trunk/Tools

2022-04-19 Thread jbedard
Title: [293034] trunk/Tools








Revision 293034
Author jbed...@apple.com
Date 2022-04-19 13:31:44 -0700 (Tue, 19 Apr 2022)


Log Message
[ews-build.webkit.org] GitHub usernames are case insensitive
https://bugs.webkit.org/show_bug.cgi?id=239509


Reviewed by Aakash Jain.

* Tools/CISupport/ews-build/steps.py:
(GitHub.email_for_owners): Treat all GitHub usernames as lowercase.
(Contributors.load): Ditto.
(ValidateCommitterAndReviewer.is_reviewer): Ditto.
(ValidateCommitterAndReviewer.is_committer): Ditto.
(ValidateCommitterAndReviewer.full_name_from_email): Ditto.
(AddReviewerMixin.gitCommitEnvironment): Ditto.
(AddAuthorToCommitMessage.author): Ditto.

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

Modified Paths

trunk/Tools/CISupport/ews-build/steps.py
trunk/Tools/ChangeLog




Diff

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

--- trunk/Tools/CISupport/ews-build/steps.py	2022-04-19 20:27:10 UTC (rev 293033)
+++ trunk/Tools/CISupport/ews-build/steps.py	2022-04-19 20:31:44 UTC (rev 293034)
@@ -133,7 +133,7 @@
 if not owners:
 return None, 'No owners defined, so email cannot be extracted'
 contributors, errors = Contributors.load(use_network=False)
-return contributors.get(owners[0], {}).get('email'), errors
+return contributors.get(owners[0].lower(), {}).get('email'), errors
 
 
 class GitHubMixin(object):
@@ -462,7 +462,7 @@
 bugzilla_email = emails[0].lower()  # We're requiring that the first email is the primary bugzilla email
 contributors[bugzilla_email] = {'name': name, 'status': value.get('status')}
 if github_username and name and emails:
-contributors[github_username] = dict(
+contributors[github_username.lower()] = dict(
 name=name,
 status=value.get('status'),
 email=emails[0].lower(),
@@ -1534,15 +1534,15 @@
 self.descriptionDone = reason
 
 def is_reviewer(self, email):
-contributor = self.contributors.get(email)
+contributor = self.contributors.get(email.lower())
 return contributor and contributor['status'] == 'reviewer'
 
 def is_committer(self, email):
-contributor = self.contributors.get(email)
+contributor = self.contributors.get(email.lower())
 return contributor and contributor['status'] in ['reviewer', 'committer']
 
 def full_name_from_email(self, email):
-contributor = self.contributors.get(email)
+contributor = self.contributors.get(email.lower())
 if not contributor:
 return ''
 return contributor.get('name')
@@ -4771,8 +4771,8 @@
 
 contributors, _ = Contributors.load(use_network=False)
 return dict(
-GIT_COMMITTER_NAME=contributors.get(owners[0], {}).get('name', 'EWS'),
-GIT_COMMITTER_EMAIL=contributors.get(owners[0], {}).get('email', FROM_EMAIL),
+GIT_COMMITTER_NAME=contributors.get(owners[0].lower(), {}).get('name', 'EWS'),
+GIT_COMMITTER_EMAIL=contributors.get(owners[0].lower(), {}).get('email', FROM_EMAIL),
 FILTER_BRANCH_SQUELCH_WARNING='1',
 )
 
@@ -4839,8 +4839,8 @@
 if not candidate:
 continue
 
-name = contributors.get(candidate, {}).get('name', None)
-email = contributors.get(candidate, {}).get('email', None)
+name = contributors.get(candidate.lower(), {}).get('name', None)
+email = contributors.get(candidate.lower(), {}).get('email', None)
 if name and email:
 return name, email
 


Modified: trunk/Tools/ChangeLog (293033 => 293034)

--- trunk/Tools/ChangeLog	2022-04-19 20:27:10 UTC (rev 293033)
+++ trunk/Tools/ChangeLog	2022-04-19 20:31:44 UTC (rev 293034)
@@ -1,3 +1,20 @@
+2022-04-19  Jonathan Bedard  
+
+[ews-build.webkit.org] GitHub usernames are case insensitive
+https://bugs.webkit.org/show_bug.cgi?id=239509
+
+
+Reviewed by Aakash Jain.
+
+* CISupport/ews-build/steps.py:
+(GitHub.email_for_owners): Treat all GitHub usernames as lowercase.
+(Contributors.load): Ditto.
+(ValidateCommitterAndReviewer.is_reviewer): Ditto.
+(ValidateCommitterAndReviewer.is_committer): Ditto.
+(ValidateCommitterAndReviewer.full_name_from_email): Ditto.
+(AddReviewerMixin.gitCommitEnvironment): Ditto.
+(AddAuthorToCommitMessage.author): Ditto.
+
 2022-04-19  Wenson Hsieh  
 
 [iOS] Text selection flickers when inserting text using dictation






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [293025] trunk/Tools

2022-04-19 Thread jbedard
Title: [293025] trunk/Tools








Revision 293025
Author jbed...@apple.com
Date 2022-04-19 11:02:22 -0700 (Tue, 19 Apr 2022)


Log Message
[ews-build.webkit.org] Resolve conflicting Mixin inheritance
https://bugs.webkit.org/show_bug.cgi?id=239504


Reviewed by Aakash Jain.

* Tools/CISupport/ews-build/steps.py:
(GitHubMixin.fetch_data_from_url_with_authentication_github): Renamed from fetch_data_from_url_with_authentication.
(GitHubMixin.get_pr_json): Invoke GitHub specific version.
(GitHubMixin.get_reviewers): Ditto.
(GitHubMixin.remove_labels): Ditto.
(BugzillaMixin.fetch_data_from_url_with_authentication_bugzilla): Renamed from fetch_data_from_url_with_authentication.
(BugzillaMixin.get_patch_json): Invoke buildbot specific version.
(BugzillaMixin.get_bug_json): Ditto.
(GitHubMixin.fetch_data_from_url_with_authentication): Renamed to fetch_data_from_url_with_authentication_github.
(BugzillaMixin.fetch_data_from_url_with_authentication): Renamed to fetch_data_from_url_with_authentication_bugzilla.

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

Modified Paths

trunk/Tools/CISupport/ews-build/steps.py
trunk/Tools/ChangeLog




Diff

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

--- trunk/Tools/CISupport/ews-build/steps.py	2022-04-19 17:57:44 UTC (rev 293024)
+++ trunk/Tools/CISupport/ews-build/steps.py	2022-04-19 18:02:22 UTC (rev 293025)
@@ -144,7 +144,7 @@
 MERGE_QUEUE_LABEL = 'merge-queue'
 UNSAFE_MERGE_QUEUE_LABEL = 'unsafe-merge-queue'
 
-def fetch_data_from_url_with_authentication(self, url):
+def fetch_data_from_url_with_authentication_github(self, url):
 response = None
 try:
 username, access_token = GitHub.credentials()
@@ -168,7 +168,7 @@
 return None
 
 pr_url = '{}/pulls/{}'.format(api_url, pr_number)
-content = self.fetch_data_from_url_with_authentication(pr_url)
+content = self.fetch_data_from_url_with_authentication_github(pr_url)
 if not content:
 return None
 
@@ -195,7 +195,7 @@
 return []
 
 reviews_url = f'{api_url}/pulls/{pr_number}/reviews'
-content = self.fetch_data_from_url_with_authentication(reviews_url)
+content = self.fetch_data_from_url_with_authentication_github(reviews_url)
 if not content:
 return []
 
@@ -281,7 +281,7 @@
 return False
 
 pr_label_url = f'{api_url}/issues/{pr_number}/labels'
-content = self.fetch_data_from_url_with_authentication(pr_label_url)
+content = self.fetch_data_from_url_with_authentication_github(pr_label_url)
 if not content:
 self._addToLog('stdio', "Failed to fetch existing labels, cannot remove labels\n")
 return True
@@ -1079,7 +1079,7 @@
 bug_closed_statuses = ['RESOLVED', 'VERIFIED', 'CLOSED']
 fast_cq_preambles = ('revert of r', 'fast-cq', '[fast-cq]')
 
-def fetch_data_from_url_with_authentication(self, url):
+def fetch_data_from_url_with_authentication_bugzilla(self, url):
 response = None
 try:
 response = requests.get(url, timeout=60, params={'Bugzilla_api_key': self.get_bugzilla_api_key()})
@@ -1109,7 +1109,7 @@
 
 def get_patch_json(self, patch_id):
 patch_url = '{}rest/bug/attachment/{}'.format(BUG_SERVER_URL, patch_id)
-patch = self.fetch_data_from_url_with_authentication(patch_url)
+patch = self.fetch_data_from_url_with_authentication_bugzilla(patch_url)
 if not patch:
 return None
 try:
@@ -1123,7 +1123,7 @@
 
 def get_bug_json(self, bug_id):
 bug_url = '{}rest/bug/{}'.format(BUG_SERVER_URL, bug_id)
-bug = self.fetch_data_from_url_with_authentication(bug_url)
+bug = self.fetch_data_from_url_with_authentication_bugzilla(bug_url)
 if not bug:
 return None
 try:


Modified: trunk/Tools/ChangeLog (293024 => 293025)

--- trunk/Tools/ChangeLog	2022-04-19 17:57:44 UTC (rev 293024)
+++ trunk/Tools/ChangeLog	2022-04-19 18:02:22 UTC (rev 293025)
@@ -1,3 +1,22 @@
+2022-04-19  Jonathan Bedard  
+
+[ews-build.webkit.org] Resolve conflicting Mixin inheritance
+https://bugs.webkit.org/show_bug.cgi?id=239504
+
+
+Reviewed by Aakash Jain.
+
+* CISupport/ews-build/steps.py:
+(GitHubMixin.fetch_data_from_url_with_authentication_github): Renamed from fetch_data_from_url_with_authentication.
+(GitHubMixin.get_pr_json): Invoke GitHub specific version.
+(GitHubMixin.get_reviewers): Ditto.
+(GitHubMixin.remove_labels): Ditto.
+(BugzillaMixin.fetch_data_from_url_with_authentication_bugzilla): Renamed from fetch_data_from_url_with_authentication.
+(BugzillaMixin.get_patch_json): Invoke buildbot specific version.
+(BugzillaMixin.get_bug_json): Ditto.
+(GitHubMixin.fetch_data_from_url_with_authentication): Renamed to 

[webkit-changes] [293023] trunk/Tools

2022-04-19 Thread jbedard
Title: [293023] trunk/Tools








Revision 293023
Author jbed...@apple.com
Date 2022-04-19 10:35:20 -0700 (Tue, 19 Apr 2022)


Log Message
[build.webkit.org] Use identifier as version when uploading artifacts (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=239321


Reviewed by Aakash Jain and Ryan Haddad.

* Tools/CISupport/build-webkit-org/steps.py:
(UploadTestResults): Strip leading r.
(ExtractTestResults.__init__): Ditto.

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

Modified Paths

trunk/Tools/CISupport/build-webkit-org/steps.py
trunk/Tools/ChangeLog




Diff

Modified: trunk/Tools/CISupport/build-webkit-org/steps.py (293022 => 293023)

--- trunk/Tools/CISupport/build-webkit-org/steps.py	2022-04-19 17:31:42 UTC (rev 293022)
+++ trunk/Tools/CISupport/build-webkit-org/steps.py	2022-04-19 17:35:20 UTC (rev 293023)
@@ -1114,7 +1114,7 @@
 
 class UploadTestResults(transfer.FileUpload):
 workersrc = "layout-test-results.zip"
-masterdest = WithProperties("public_html/results/%(buildername)s/r%(archive_revision)s (%(buildnumber)s).zip")
+masterdest = WithProperties("public_html/results/%(buildername)s/%(archive_revision)s (%(buildnumber)s).zip")
 
 def __init__(self, **kwargs):
 kwargs['workersrc'] = self.workersrc
@@ -1158,8 +1158,8 @@
 def __init__(self, **kwargs):
 kwargs['command'] = ""
 kwargs['logEnviron'] = False
-self.zipFile = Interpolate('public_html/results/%(prop:buildername)s/r%(prop:archive_revision)s (%(prop:buildnumber)s).zip')
-self.resultDirectory = Interpolate('public_html/results/%(prop:buildername)s/r%(prop:archive_revision)s (%(prop:buildnumber)s)')
+self.zipFile = Interpolate('public_html/results/%(prop:buildername)s/%(prop:archive_revision)s (%(prop:buildnumber)s).zip')
+self.resultDirectory = Interpolate('public_html/results/%(prop:buildername)s/%(prop:archive_revision)s (%(prop:buildnumber)s)')
 kwargs['command'] = ['unzip', '-q', '-o', self.zipFile, '-d', self.resultDirectory]
 master.MasterShellCommand.__init__(self, **kwargs)
 


Modified: trunk/Tools/ChangeLog (293022 => 293023)

--- trunk/Tools/ChangeLog	2022-04-19 17:31:42 UTC (rev 293022)
+++ trunk/Tools/ChangeLog	2022-04-19 17:35:20 UTC (rev 293023)
@@ -1,3 +1,15 @@
+2022-04-18  Jonathan Bedard  
+
+[build.webkit.org] Use identifier as version when uploading artifacts (Follow-up fix)
+https://bugs.webkit.org/show_bug.cgi?id=239321
+
+
+Reviewed by Aakash Jain and Ryan Haddad.
+
+* CISupport/build-webkit-org/steps.py:
+(UploadTestResults): Strip leading r.
+(ExtractTestResults.__init__): Ditto.
+
 2022-04-19  Aakash Jain  
 
 Delete old buildbot code from bot watchers dashboard






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [293019] trunk/metadata/contributors.json

2022-04-19 Thread jbedard
Title: [293019] trunk/metadata/contributors.json








Revision 293019
Author jbed...@apple.com
Date 2022-04-19 10:14:21 -0700 (Tue, 19 Apr 2022)


Log Message
Adding botwatchers github usernames to contributors json

Reviewed by Jonathan Bedard.

* metadata/contributors.json:

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

Modified Paths

trunk/metadata/contributors.json




Diff

Modified: trunk/metadata/contributors.json (293018 => 293019)

--- trunk/metadata/contributors.json	2022-04-19 16:45:18 UTC (rev 293018)
+++ trunk/metadata/contributors.json	2022-04-19 17:14:21 UTC (rev 293019)
@@ -3920,6 +3920,7 @@
   "emails" : [
  "rack...@apple.com"
   ],
+  "github" : "KarlRackler",
   "name" : "Karl Rackler",
   "status" : "committer"
},
@@ -6609,6 +6610,7 @@
   "emails" : [
  "tsav...@apple.com"
   ],
+  "github" : "Technose",
   "name" : "Truitt Savell",
   "status" : "committer"
},






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [292966] trunk/Tools

2022-04-18 Thread jbedard
Title: [292966] trunk/Tools








Revision 292966
Author jbed...@apple.com
Date 2022-04-18 13:25:01 -0700 (Mon, 18 Apr 2022)


Log Message
[ews.webkit.org] Reduce status updates
https://bugs.webkit.org/show_bug.cgi?id=239414


Reviewed by Aakash Jain.

We're starting to bump against our API limits, many very short steps report
their status, only to be imiediately overwritten. Skip step started updates.

* Tools/CISupport/ews-build/events.py:
(Events.stepStarted):

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

Modified Paths

trunk/Tools/CISupport/ews-build/events.py
trunk/Tools/ChangeLog




Diff

Modified: trunk/Tools/CISupport/ews-build/events.py (292965 => 292966)

--- trunk/Tools/CISupport/ews-build/events.py	2022-04-18 19:49:44 UTC (rev 292965)
+++ trunk/Tools/CISupport/ews-build/events.py	2022-04-18 20:25:01 UTC (rev 292966)
@@ -81,6 +81,18 @@
 
 EVENT_SERVER_ENDPOINT = 'https://ews.webkit{}.org/results/'.format(custom_suffix).encode()
 MAX_GITHUB_DESCRIPTION = 140
+SHORT_STEPS = (
+'configure-build',
+'validate-change',
+'configuration',
+'clean-up-git-repo',
+'fetch-branch-references',
+'show-identifier',
+'update-working-directory',
+'apply-patch',
+'kill-old-processes',
+'set-build-summary',
+)
 
 def __init__(self, master_hostname, type_prefix='', name='Events'):
 """
@@ -260,7 +272,7 @@
 build['properties'] = yield self.master.db.builds.getBuildProperties(step.get('buildid'))
 
 # We need to force the defered properties to resolve
-if build['properties'].get('github.number'):
+if build['properties'].get('github.number') and build.get('step') not in self.SHORT_STEPS:
 self.stepStartedGitHub(build, state_string)
 
 data = {


Modified: trunk/Tools/ChangeLog (292965 => 292966)

--- trunk/Tools/ChangeLog	2022-04-18 19:49:44 UTC (rev 292965)
+++ trunk/Tools/ChangeLog	2022-04-18 20:25:01 UTC (rev 292966)
@@ -1,3 +1,17 @@
+2022-04-15  Jonathan Bedard  
+
+[ews.webkit.org] Reduce status updates
+https://bugs.webkit.org/show_bug.cgi?id=239414
+
+
+Reviewed by Aakash Jain.
+
+We're starting to bump against our API limits, many very short steps report
+their status, only to be imiediately overwritten. Skip step started updates.
+
+* CISupport/ews-build/events.py:
+(Events.stepStarted):
+
 2022-04-15  Justin Michaud  
 
 [PGO] Fix build on intel machines






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [292958] trunk/Tools

2022-04-18 Thread jbedard
Title: [292958] trunk/Tools








Revision 292958
Author jbed...@apple.com
Date 2022-04-18 10:02:07 -0700 (Mon, 18 Apr 2022)


Log Message
[Merge-Queue] Handle label addition race condition
https://bugs.webkit.org/show_bug.cgi?id=238973


Reviewed by Aakash Jain.

* Tools/CISupport/ews-build/events.py:
(GitHubEventHandlerNoEdits.handle_pull_request): Wait for 10 seconds before processing
label additions.

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

Modified Paths

trunk/Tools/CISupport/ews-build/events.py
trunk/Tools/ChangeLog




Diff

Modified: trunk/Tools/CISupport/ews-build/events.py (292957 => 292958)

--- trunk/Tools/CISupport/ews-build/events.py	2022-04-18 16:46:04 UTC (rev 292957)
+++ trunk/Tools/CISupport/ews-build/events.py	2022-04-18 17:02:07 UTC (rev 292958)
@@ -366,6 +366,7 @@
 log.msg("PR #{} was labeled for merge-queue".format(pr_number))
 # 'labeled' is usually an ignored action, override it to force build
 payload['action'] = 'synchronize'
+time.sleep(10)
 return super(GitHubEventHandlerNoEdits, self).handle_pull_request(payload, 'merge_queue')
 
 return super(GitHubEventHandlerNoEdits, self).handle_pull_request(payload, event)


Modified: trunk/Tools/ChangeLog (292957 => 292958)

--- trunk/Tools/ChangeLog	2022-04-18 16:46:04 UTC (rev 292957)
+++ trunk/Tools/ChangeLog	2022-04-18 17:02:07 UTC (rev 292958)
@@ -1,3 +1,15 @@
+2022-04-07  Jonathan Bedard  
+
+[Merge-Queue] Handle label addition race condition
+https://bugs.webkit.org/show_bug.cgi?id=238973
+
+
+Reviewed by Aakash Jain.
+
+* CISupport/ews-build/events.py:
+(GitHubEventHandlerNoEdits.handle_pull_request): Wait for 10 seconds before processing
+label additions.
+
 2022-04-18  Wenson Hsieh  
 
 Make the main video heuristic robust when video elements are added after entering fullscreen






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [292937] trunk

2022-04-15 Thread jbedard
Title: [292937] trunk








Revision 292937
Author jbed...@apple.com
Date 2022-04-15 18:59:43 -0700 (Fri, 15 Apr 2022)


Log Message
[git-webkit] Allow projects to declare alternate remotes
https://bugs.webkit.org/show_bug.cgi?id=239261


Reviewed by Dewei Zhu.

* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump verison.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git.remote): Move logic to remote.Scm.from_url.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py:
(Setup.github): Allow user to specify trailing remote name.
(Setup._add_remote): Add a remote or modify exising remote.
(Setup._fork_remote): Determine a remote url based on origin url.
(Setup.git): If the project declares remotes, check if the user is using the righ origin. Warn them
if they are not. Check if the user has access to alternate remotes, if they do, add those remotes
and create forks for them. Fetch all fork remotes. Do not fork repository if origin does not match
declared origin.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/scm.py:
(Scm.from_url): Moved logic from local.Git.remote.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/setup_unittest.py:
* metadata/git_config_extension: Add expected remotes.

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

Modified Paths

trunk/ChangeLog
trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/scm.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/setup_unittest.py
trunk/metadata/git_config_extension




Diff

Modified: trunk/ChangeLog (292936 => 292937)

--- trunk/ChangeLog	2022-04-16 01:16:56 UTC (rev 292936)
+++ trunk/ChangeLog	2022-04-16 01:59:43 UTC (rev 292937)
@@ -1,3 +1,13 @@
+2022-04-12  Jonathan Bedard  
+
+[git-webkit] Allow projects to declare alternate remotes
+https://bugs.webkit.org/show_bug.cgi?id=239261
+
+
+Reviewed by Dewei Zhu.
+
+* metadata/git_config_extension: Add expected remotes.
+
 2022-04-15  Justin Michaud  
 
 Add GitHub info to contributors.json


Modified: trunk/Tools/ChangeLog (292936 => 292937)

--- trunk/Tools/ChangeLog	2022-04-16 01:16:56 UTC (rev 292936)
+++ trunk/Tools/ChangeLog	2022-04-16 01:59:43 UTC (rev 292937)
@@ -1,3 +1,27 @@
+2022-04-12  Jonathan Bedard  
+
+[git-webkit] Allow projects to declare alternate remotes
+https://bugs.webkit.org/show_bug.cgi?id=239261
+
+
+Reviewed by Dewei Zhu.
+
+* Scripts/libraries/webkitscmpy/setup.py: Bump verison.
+* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
+* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
+(Git.remote): Move logic to remote.Scm.from_url.
+* Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py:
+(Setup.github): Allow user to specify trailing remote name.
+(Setup._add_remote): Add a remote or modify exising remote.
+(Setup._fork_remote): Determine a remote url based on origin url.
+(Setup.git): If the project declares remotes, check if the user is using the righ origin. Warn them
+if they are not. Check if the user has access to alternate remotes, if they do, add those remotes
+and create forks for them. Fetch all fork remotes. Do not fork repository if origin does not match
+declared origin.
+* Scripts/libraries/webkitscmpy/webkitscmpy/remote/scm.py:
+(Scm.from_url): Moved logic from local.Git.remote.
+* Scripts/libraries/webkitscmpy/webkitscmpy/test/setup_unittest.py:
+
 2022-04-15  Yusuke Suzuki  
 
 [JSC] Remove VM& parameter from structure related code including jsDyamicCast


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (292936 => 292937)

--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-04-16 01:16:56 UTC (rev 292936)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-04-16 01:59:43 UTC (rev 292937)
@@ -29,7 +29,7 @@
 
 setup(
 name='webkitscmpy',
-version='4.9.3',
+version='4.10.0',
 description='Library designed to interact with git and svn repositories.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (292936 => 292937)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-04-16 01:16:56 UTC (rev 292936)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-04-16 01:59:43 UTC (rev 292937)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(4, 9, 3)
+version = Version(4, 

[webkit-changes] [292936] trunk/Websites/webkit.org

2022-04-15 Thread jbedard
Title: [292936] trunk/Websites/webkit.org








Revision 292936
Author jbed...@apple.com
Date 2022-04-15 18:16:56 -0700 (Fri, 15 Apr 2022)


Log Message
[webkit.org] Remove leading r from archive revisions (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=239322


Reviewed by Alexey Proskuryakov.

* Websites/webkit.org/wp-content/themes/webkit/build-archives.php:
Identifiers are strings, not integers. Use new v3 endpoint.

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

Modified Paths

trunk/Websites/webkit.org/ChangeLog
trunk/Websites/webkit.org/wp-content/themes/webkit/build-archives.php




Diff

Modified: trunk/Websites/webkit.org/ChangeLog (292935 => 292936)

--- trunk/Websites/webkit.org/ChangeLog	2022-04-16 01:16:01 UTC (rev 292935)
+++ trunk/Websites/webkit.org/ChangeLog	2022-04-16 01:16:56 UTC (rev 292936)
@@ -1,3 +1,14 @@
+2022-04-15  Jonathan Bedard  
+
+[webkit.org] Remove leading r from archive revisions (Follow-up fix)
+https://bugs.webkit.org/show_bug.cgi?id=239322
+
+
+Reviewed by Alexey Proskuryakov.
+
+* Websites/webkit.org/wp-content/themes/webkit/build-archives.php:
+Identifiers are strings, not integers. Use new v3 endpoint.
+
 2022-04-13  Jonathan Bedard  
 
 [webkit.org] Remove leading r from archive revisions


Modified: trunk/Websites/webkit.org/wp-content/themes/webkit/build-archives.php (292935 => 292936)

--- trunk/Websites/webkit.org/wp-content/themes/webkit/build-archives.php	2022-04-16 01:16:01 UTC (rev 292935)
+++ trunk/Websites/webkit.org/wp-content/themes/webkit/build-archives.php	2022-04-16 01:16:56 UTC (rev 292936)
@@ -12,7 +12,6 @@
 public static $platforms = array(
 'mac-monterey-x86_64%20arm64' => 'Monterey',
 'mac-bigsur-x86_64%20arm64' => 'Big Sur',
-'mac-catalina-x86_64' => 'Catalina',
 );
 
 public static function object() {
@@ -22,7 +21,7 @@
 }
 
 private function call ($endpoint, $params = array()) {
-$url = "" 'https://q1tzqfy48e.execute-api.us-west-2.amazonaws.com/v2_2/' . $endpoint);
+$url = "" 'https://q1tzqfy48e.execute-api.us-west-2.amazonaws.com/v3/' . $endpoint);
 $api = wp_remote_get($url);
 $response = wp_remote_retrieve_body($api);
 
@@ -44,10 +43,10 @@
 $latest[$platform_key] = array();
 
 foreach ($data->Items as &$entry) {
-$revision = new stdClass();
-$revision->url = ""
-$revision->creationTime = $entry->creationTime->N;
-$latest[$platform_key][$entry->revision->N] = $revision;
+$change = new stdClass();
+$change->url = ""
+$change->creationTime = $entry->creationTime->N;
+$latest[$platform_key][$entry->identifier->S] = $change;
 }
 
 set_transient($cachekey, serialize($latest), 600); // expire cache every 10 minutes
@@ -131,9 +130,9 @@
 
 $lists = '';
 ob_start();
-foreach ($archives as $platform => $revisions):
+foreach ($archives as $platform => $changes):
 
-if (empty($revisions)) {
+if (empty($changes)) {
 echo '' . $error_markup . '';
 continue;
 }
@@ -140,9 +139,9 @@
 ?>
 
 
- $entry): ?>
+ $entry): ?>
 
-url); ?>">
+url); ?>">
 creationTime) * 1000; ?>
 
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [292890] trunk/Tools

2022-04-14 Thread jbedard
Title: [292890] trunk/Tools








Revision 292890
Author jbed...@apple.com
Date 2022-04-14 14:15:31 -0700 (Thu, 14 Apr 2022)


Log Message
[git-webkit] Personal branch is "not a PR branch"
https://bugs.webkit.org/show_bug.cgi?id=239329


Reviewed by Yusuke Suzuki.

* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git.branches_for): Provide optional caching.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py:
(Branch.editable): If a branch does not exist on production remotes, that branch
should also be considered a PR branch.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:
(PullRequest.main): Only create a new PR branch if the current branch is a
production branch.

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

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py




Diff

Modified: trunk/Tools/ChangeLog (292889 => 292890)

--- trunk/Tools/ChangeLog	2022-04-14 21:00:59 UTC (rev 292889)
+++ trunk/Tools/ChangeLog	2022-04-14 21:15:31 UTC (rev 292890)
@@ -1,3 +1,22 @@
+2022-04-14  Jonathan Bedard  
+
+[git-webkit] Personal branch is "not a PR branch"
+https://bugs.webkit.org/show_bug.cgi?id=239329
+
+
+Reviewed by Yusuke Suzuki.
+
+* Scripts/libraries/webkitscmpy/setup.py: Bump version.
+* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
+* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
+(Git.branches_for): Provide optional caching.
+* Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py:
+(Branch.editable): If a branch does not exist on production remotes, that branch
+should also be considered a PR branch.
+* Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:
+(PullRequest.main): Only create a new PR branch if the current branch is a
+production branch.
+
 2022-04-14  Wenson Hsieh  
 
 [iOS] [WK2] Managed pasteboard should function for all managed domains


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (292889 => 292890)

--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-04-14 21:00:59 UTC (rev 292889)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-04-14 21:15:31 UTC (rev 292890)
@@ -29,7 +29,7 @@
 
 setup(
 name='webkitscmpy',
-version='4.9.2',
+version='4.9.3',
 description='Library designed to interact with git and svn repositories.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (292889 => 292890)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-04-14 21:00:59 UTC (rev 292889)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-04-14 21:15:31 UTC (rev 292890)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(4, 9, 2)
+version = Version(4, 9, 3)
 
 AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
 AutoInstall.register(Package('jinja2', Version(2, 11, 3)))


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py (292889 => 292890)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py	2022-04-14 21:00:59 UTC (rev 292889)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py	2022-04-14 21:15:31 UTC (rev 292890)
@@ -505,6 +505,7 @@
 raise self.Exception('Failed to retrieve revision count for {}'.format(native_parameter))
 return int(revision_count.stdout)
 
+@decorators.Memoize(cached=False)
 def branches_for(self, hash=None, remote=True):
 branch = run(
 [self.executable(), 'branch'] + (['--contains', hash] if hash else ['-a']),


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py (292889 => 292890)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py	2022-04-14 21:00:59 UTC (rev 292889)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py	2022-04-14 21:15:31 UTC (rev 292890)
@@ -54,8 +54,19 @@
 def editable(cls, branch, repository=None):
 if (repository or local.Scm).DEV_BRANCHES.match(branch):
 return True
-return False
+if branch in (repository or local.Scm).DEFAULT_BRANCHES:
+return False
+if (repository or local.Scm).PROD_BRANCHES.match(branch):
+return False
+if not repository or not 

[webkit-changes] [292889] trunk/Websites/webkit.org

2022-04-14 Thread jbedard
Title: [292889] trunk/Websites/webkit.org








Revision 292889
Author jbed...@apple.com
Date 2022-04-14 14:00:59 -0700 (Thu, 14 Apr 2022)


Log Message
[webkit.org] Remove leading r from archive revisions
https://bugs.webkit.org/show_bug.cgi?id=239322


Reviewed by Ryan Haddad.

* Websites/webkit.org/wp-content/themes/webkit/build-archives.php: Remove leading 'r' from revisions,
since "revisions" will now be identifiers.

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

Modified Paths

trunk/Websites/webkit.org/ChangeLog
trunk/Websites/webkit.org/wp-content/themes/webkit/build-archives.php




Diff

Modified: trunk/Websites/webkit.org/ChangeLog (292888 => 292889)

--- trunk/Websites/webkit.org/ChangeLog	2022-04-14 20:58:47 UTC (rev 292888)
+++ trunk/Websites/webkit.org/ChangeLog	2022-04-14 21:00:59 UTC (rev 292889)
@@ -1,3 +1,14 @@
+2022-04-13  Jonathan Bedard  
+
+[webkit.org] Remove leading r from archive revisions
+https://bugs.webkit.org/show_bug.cgi?id=239322
+
+
+Reviewed by Ryan Haddad.
+
+* wp-content/themes/webkit/build-archives.php: Remove leading 'r' from revisions,
+since "revisions" will now be identifiers.
+
 2022-03-11  Jon Davis  
 
 Allow table of contents on posts in special cases


Modified: trunk/Websites/webkit.org/wp-content/themes/webkit/build-archives.php (292888 => 292889)

--- trunk/Websites/webkit.org/wp-content/themes/webkit/build-archives.php	2022-04-14 20:58:47 UTC (rev 292888)
+++ trunk/Websites/webkit.org/wp-content/themes/webkit/build-archives.php	2022-04-14 21:00:59 UTC (rev 292889)
@@ -47,7 +47,7 @@
 $revision = new stdClass();
 $revision->url = ""
 $revision->creationTime = $entry->creationTime->N;
-$latest[$platform_key]["r" . $entry->revision->N] = $revision;
+$latest[$platform_key][$entry->revision->N] = $revision;
 }
 
 set_transient($cachekey, serialize($latest), 600); // expire cache every 10 minutes






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [292884] trunk

2022-04-14 Thread jbedard
Title: [292884] trunk








Revision 292884
Author jbed...@apple.com
Date 2022-04-14 12:45:24 -0700 (Thu, 14 Apr 2022)


Log Message
Add .github/pull_request_template.md
https://bugs.webkit.org/show_bug.cgi?id=239347


Reviewed by Michael Catanzaro.

* .github/pull_request_template.md: Added.

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

Modified Paths

trunk/ChangeLog


Added Paths

trunk/.github/
trunk/.github/pull_request_template.md




Diff

Added: trunk/.github/pull_request_template.md (0 => 292884)

--- trunk/.github/pull_request_template.md	(rev 0)
+++ trunk/.github/pull_request_template.md	2022-04-14 19:45:24 UTC (rev 292884)
@@ -0,0 +1,27 @@
+# Pull Request Template
+
+## File a Bug
+
+All changes should be associated with a bug. The WebKit project is currently using [Bugzilla](https://bugs.webkit.org) as our bug tracker. Note that multiple changes may be associated with a single bug.
+
+## Provided Tooling
+
+The WebKit Project strongly recommends contributors use [`Tools/Scripts/git-webkit`](https://github.com/WebKit/WebKit/tree/main/Tools/Scripts/git-webkit) to generate pull requests. See [Setup](https://github.com/WebKit/WebKit/wiki/Contributing#setup) and [Contributing Code](https://github.com/WebKit/WebKit/wiki/Contributing#contributing-code) for how to do this.
+
+## Template
+
+If a contributor wishes to file a pull request manually, the template is below. Manually-filed pull requests should contain their commit message as the pull request description, and their commit message should be formatted like the template below.
+
+Additionally, the pull request should be mentioned on [Bugzilla](https://bugs.webkit.org), labels applied to the pull request matching the component and version of the [Bugzilla](https://bugs.webkit.org) associated with the pull request and the pull request assigned to its author.
+
+
+< bug title >
+


Modified: trunk/ChangeLog (292883 => 292884)

--- trunk/ChangeLog	2022-04-14 19:30:30 UTC (rev 292883)
+++ trunk/ChangeLog	2022-04-14 19:45:24 UTC (rev 292884)
@@ -1,3 +1,13 @@
+2022-04-14  Jonathan Bedard  
+
+Add .github/pull_request_template.md
+https://bugs.webkit.org/show_bug.cgi?id=239347
+
+
+Reviewed by Michael Catanzaro.
+
+* .github/pull_request_template.md: Added.
+
 2022-04-14  Justin Michaud  
 
 [PGO] We should be able to build WebKit to collect PGO profiles easily






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [292881] trunk/Tools

2022-04-14 Thread jbedard
Title: [292881] trunk/Tools








Revision 292881
Author jbed...@apple.com
Date 2022-04-14 12:04:36 -0700 (Thu, 14 Apr 2022)


Log Message
[build.webkit.org] Use identifier as version when uploading artifacts
https://bugs.webkit.org/show_bug.cgi?id=239321


Reviewed by Ryan Haddad.

* Tools/CISupport/build-webkit-org/steps.py:
(GenerateJSCBundle): Use archive_revision to name generated content.
(GenerateMiniBrowserBundle): Ditto
(UploadBuiltProduct): Ditto
(UploadMinifiedBuiltProduct): Ditto
(DownloadBuiltProduct): Ditto
(DownloadBuiltProductFromMaster): Ditto
(RunBenchmarkTests): Ditto
(UploadTestResults): Ditto
(TransferToS3): Ditto
(ExtractTestResults.__init__): Ditto
(ShowIdentifier.evaluateCommand): Set archive_revision as identifier,
fall back to got_revision.

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

Modified Paths

trunk/Tools/CISupport/build-webkit-org/steps.py
trunk/Tools/ChangeLog




Diff

Modified: trunk/Tools/CISupport/build-webkit-org/steps.py (292880 => 292881)

--- trunk/Tools/CISupport/build-webkit-org/steps.py	2022-04-14 18:00:45 UTC (rev 292880)
+++ trunk/Tools/CISupport/build-webkit-org/steps.py	2022-04-14 19:04:36 UTC (rev 292881)
@@ -348,7 +348,7 @@
 class GenerateJSCBundle(shell.ShellCommand):
 command = ["Tools/Scripts/generate-bundle", "--builder-name", WithProperties("%(buildername)s"),
"--bundle=jsc", "--syslibs=bundle-all", WithProperties("--platform=%(fullPlatform)s"),
-   WithProperties("--%(configuration)s"), WithProperties("--revision=%(got_revision)s"),
+   WithProperties("--%(configuration)s"), WithProperties("--revision=%(archive_revision)s"),
"--remote-config-file", "../../remote-jsc-bundle-upload-config.json"]
 name = "generate-jsc-bundle"
 description = ["generating jsc bundle"]
@@ -359,7 +359,7 @@
 class GenerateMiniBrowserBundle(shell.ShellCommand):
 command = ["Tools/Scripts/generate-bundle", "--builder-name", WithProperties("%(buildername)s"),
"--bundle=MiniBrowser", WithProperties("--platform=%(fullPlatform)s"),
-   WithProperties("--%(configuration)s"), WithProperties("--revision=%(got_revision)s"),
+   WithProperties("--%(configuration)s"), WithProperties("--revision=%(archive_revision)s"),
"--remote-config-file", "../../remote-minibrowser-bundle-upload-config.json"]
 name = "generate-minibrowser-bundle"
 description = ["generating minibrowser bundle"]
@@ -378,7 +378,7 @@
 
 class UploadBuiltProduct(transfer.FileUpload):
 workersrc = WithProperties("WebKitBuild/%(configuration)s.zip")
-masterdest = WithProperties("archives/%(fullPlatform)s-%(architecture)s-%(configuration)s/%(got_revision)s.zip")
+masterdest = WithProperties("archives/%(fullPlatform)s-%(architecture)s-%(configuration)s/%(archive_revision)s.zip")
 haltOnFailure = True
 
 def __init__(self, **kwargs):
@@ -391,13 +391,13 @@
 
 class UploadMinifiedBuiltProduct(UploadBuiltProduct):
 workersrc = WithProperties("WebKitBuild/minified-%(configuration)s.zip")
-masterdest = WithProperties("archives/%(fullPlatform)s-%(architecture)s-%(configuration)s/minified-%(got_revision)s.zip")
+masterdest = WithProperties("archives/%(fullPlatform)s-%(architecture)s-%(configuration)s/minified-%(archive_revision)s.zip")
 
 
 class DownloadBuiltProduct(shell.ShellCommand):
 command = ["python3", "Tools/CISupport/download-built-product",
 WithProperties("--platform=%(platform)s"), WithProperties("--%(configuration)s"),
-WithProperties(S3URL + "archives.webkit.org/%(fullPlatform)s-%(architecture)s-%(configuration)s/%(got_revision)s.zip")]
+WithProperties(S3URL + "archives.webkit.org/%(fullPlatform)s-%(architecture)s-%(configuration)s/%(archive_revision)s.zip")]
 name = "download-built-product"
 description = ["downloading built product"]
 descriptionDone = ["downloaded built product"]
@@ -420,7 +420,7 @@
 
 
 class DownloadBuiltProductFromMaster(transfer.FileDownload):
-mastersrc = WithProperties('archives/%(fullPlatform)s-%(architecture)s-%(configuration)s/%(got_revision)s.zip')
+mastersrc = WithProperties('archives/%(fullPlatform)s-%(architecture)s-%(configuration)s/%(archive_revision)s.zip')
 workerdest = WithProperties('WebKitBuild/%(configuration)s.zip')
 name = 'download-built-product-from-master'
 description = ['downloading built product from buildbot master']
@@ -1079,7 +1079,7 @@
 descriptionDone = ["benchmark tests"]
 command = ["python", "Tools/Scripts/browserperfdash-benchmark", "--allplans",
"--config-file", "../../browserperfdash-benchmark-config.txt",
-   "--browser-version", WithProperties("r%(got_revision)s")]
+   "--browser-version", WithProperties("%(archive_revision)s")]
 
 def start(self):
 platform = self.getProperty("platform")
@@ -1108,7 +1108,7 @@
 
 class UploadTestResults(transfer.FileUpload):
  

[webkit-changes] [292844] trunk/Tools

2022-04-13 Thread jbedard
Title: [292844] trunk/Tools








Revision 292844
Author jbed...@apple.com
Date 2022-04-13 16:43:01 -0700 (Wed, 13 Apr 2022)


Log Message
[git-webkit] Found branch name instead of hash
https://bugs.webkit.org/show_bug.cgi?id=239296


Reviewed by Michael Catanzaro.

* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git.Cache.populate): Add --no-decorate to `git log` command.
(Git.commit): Ditto.
(Git.commits): Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:
(TestGit.test_log): Ditto.

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

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py




Diff

Modified: trunk/Tools/ChangeLog (292843 => 292844)

--- trunk/Tools/ChangeLog	2022-04-13 23:24:40 UTC (rev 292843)
+++ trunk/Tools/ChangeLog	2022-04-13 23:43:01 UTC (rev 292844)
@@ -1,3 +1,21 @@
+2022-04-13  Jonathan Bedard  
+
+[git-webkit] Found branch name instead of hash
+https://bugs.webkit.org/show_bug.cgi?id=239296
+
+
+Reviewed by Michael Catanzaro.
+
+* Scripts/libraries/webkitscmpy/setup.py: Bump version.
+* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
+* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
+(Git.Cache.populate): Add --no-decorate to `git log` command.
+(Git.commit): Ditto.
+(Git.commits): Ditto.
+* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
+* Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:
+(TestGit.test_log): Ditto.
+
 2022-04-13  Ross Kirsling  
 
 Add PlayStation builds to bot watcher's dashboard.


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (292843 => 292844)

--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-04-13 23:24:40 UTC (rev 292843)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-04-13 23:43:01 UTC (rev 292844)
@@ -29,7 +29,7 @@
 
 setup(
 name='webkitscmpy',
-version='4.9.1',
+version='4.9.2',
 description='Library designed to interact with git and svn repositories.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (292843 => 292844)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-04-13 23:24:40 UTC (rev 292843)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-04-13 23:43:01 UTC (rev 292844)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(4, 9, 1)
+version = Version(4, 9, 2)
 
 AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
 AutoInstall.register(Package('jinja2', Version(2, 11, 3)))


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py (292843 => 292844)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py	2022-04-13 23:24:40 UTC (rev 292843)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py	2022-04-13 23:43:01 UTC (rev 292844)
@@ -130,7 +130,7 @@
 kwargs = dict(encoding='utf-8')
 self._last_populated[branch] = time.time()
 log = subprocess.Popen(
-[self.repo.executable(), 'log', branch],
+[self.repo.executable(), 'log', branch, '--no-decorate'],
 cwd=self.repo.root_path,
 stdout=subprocess.PIPE,
 stderr=subprocess.PIPE,
@@ -560,7 +560,7 @@
 
 default_branch = self.default_branch
 parsed_branch_point = None
-log_format = ['-1'] if include_log else ['-1', '--format=short']
+log_format = ['-1', '--no-decorate'] if include_log else ['-1', '--no-decorate', '--format=short']
 
 # Determine the `git log` output and branch for a given identifier
 if identifier is not None:
@@ -743,7 +743,7 @@
 try:
 log = None
 log = subprocess.Popen(
-[self.executable(), 'log', '--format=fuller', '{}...{}'.format(end.hash, begin.hash)],
+[self.executable(), 'log', '--format=fuller', '--no-decorate', '{}...{}'.format(end.hash, begin.hash)],
 cwd=self.root_path,
 stdout=subprocess.PIPE,
 stderr=subprocess.PIPE,


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py (292843 => 292844)


[webkit-changes] [292807] trunk/Tools

2022-04-13 Thread jbedard
Title: [292807] trunk/Tools








Revision 292807
Author jbed...@apple.com
Date 2022-04-13 05:53:15 -0700 (Wed, 13 Apr 2022)


Log Message
[Merge-Queue] Do not duplicate reviewer names
https://bugs.webkit.org/show_bug.cgi?id=239270


Reviewed by Yusuke Suzuki.

* Tools/CISupport/ews-build/steps.py:
(ValidateCommitterAndReviewer.start):
* Tools/CISupport/ews-build/steps_unittest.py:

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

Modified Paths

trunk/Tools/CISupport/ews-build/steps.py
trunk/Tools/CISupport/ews-build/steps_unittest.py
trunk/Tools/ChangeLog




Diff

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

--- trunk/Tools/CISupport/ews-build/steps.py	2022-04-13 12:20:25 UTC (rev 292806)
+++ trunk/Tools/CISupport/ews-build/steps.py	2022-04-13 12:53:15 UTC (rev 292807)
@@ -1578,6 +1578,7 @@
 else:
 reviewer = self.getProperty('reviewer', '').lower()
 reviewers = [reviewer] if reviewer else []
+reviewers = set(reviewers)
 
 if not reviewers:
 # Change has not been reviewed in bug tracker. This is acceptable, since the ChangeLog might have 'Reviewed by' in it.


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

--- trunk/Tools/CISupport/ews-build/steps_unittest.py	2022-04-13 12:20:25 UTC (rev 292806)
+++ trunk/Tools/CISupport/ews-build/steps_unittest.py	2022-04-13 12:53:15 UTC (rev 292807)
@@ -5204,7 +5204,9 @@
 self.expectHidden(False)
 self.assertEqual(ValidateCommitterAndReviewer.haltOnFailure, False)
 self.expectOutcome(result=SUCCESS, state_string='Validated commiter and reviewer')
-return self.runStep()
+rc = self.runStep()
+self.assertEqual(self.getProperty('reviewers_full_names'), ['WebKit Reviewer'])
+return rc
 
 def test_success_pr(self):
 self.setupStep(ValidateCommitterAndReviewer())
@@ -5214,8 +5216,22 @@
 self.expectHidden(False)
 self.assertEqual(ValidateCommitterAndReviewer.haltOnFailure, False)
 self.expectOutcome(result=SUCCESS, state_string='Validated commiter and reviewer')
-return self.runStep()
+rc = self.runStep()
+self.assertEqual(self.getProperty('reviewers_full_names'), ['WebKit Reviewer'])
+return rc
 
+def test_success_pr_duplicate(self):
+self.setupStep(ValidateCommitterAndReviewer())
+ValidateCommitterAndReviewer.get_reviewers = lambda x, pull_request, repository_url=None: ['webkit-reviewer', 'webkit-reviewer']
+self.setProperty('github.number', '1234')
+self.setProperty('owners', ['webkit-commit-queue'])
+self.expectHidden(False)
+self.assertEqual(ValidateCommitterAndReviewer.haltOnFailure, False)
+self.expectOutcome(result=SUCCESS, state_string='Validated commiter and reviewer')
+rc = self.runStep()
+self.assertEqual(self.getProperty('reviewers_full_names'), ['WebKit Reviewer'])
+return rc
+
 def test_success_no_reviewer_patch(self):
 self.setupStep(ValidateCommitterAndReviewer())
 self.setProperty('patch_id', '1234')


Modified: trunk/Tools/ChangeLog (292806 => 292807)

--- trunk/Tools/ChangeLog	2022-04-13 12:20:25 UTC (rev 292806)
+++ trunk/Tools/ChangeLog	2022-04-13 12:53:15 UTC (rev 292807)
@@ -1,3 +1,15 @@
+2022-04-12  Jonathan Bedard  
+
+[Merge-Queue] Do not duplicate reviewer names
+https://bugs.webkit.org/show_bug.cgi?id=239270
+
+
+Reviewed by Yusuke Suzuki.
+
+* CISupport/ews-build/steps.py:
+(ValidateCommitterAndReviewer.start):
+* CISupport/ews-build/steps_unittest.py:
+
 2022-04-13  Diego Pino Garcia  
 
 [JHBuild] Unreviewed, replace 'false' for 'disabled' in glib mesonargs






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [292785] trunk/Tools

2022-04-12 Thread jbedard
Title: [292785] trunk/Tools








Revision 292785
Author jbed...@apple.com
Date 2022-04-12 14:36:14 -0700 (Tue, 12 Apr 2022)


Log Message
[Merge-Queue] Prioritize oldest builds first
https://bugs.webkit.org/show_bug.cgi?id=239094
]

Reviewed by Stephanie Lewis.

* Tools/CISupport/ews-build/loadConfig.py:
(loadBuilderConfig):
(async_sort): Added.
(prioritizeBuilders): Prioritize the builder with the oldest request.
* Tools/CISupport/ews-build/loadConfig_unittest.py:
(TestPrioritizeBuilders):
(TestPrioritizeBuilders.MockBuilder):
(TestPrioritizeBuilders.test_builders_over_testers):
(TestPrioritizeBuilders.test_starvation):

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

Modified Paths

trunk/Tools/CISupport/ews-build/loadConfig.py
trunk/Tools/CISupport/ews-build/loadConfig_unittest.py
trunk/Tools/ChangeLog




Diff

Modified: trunk/Tools/CISupport/ews-build/loadConfig.py (292784 => 292785)

--- trunk/Tools/CISupport/ews-build/loadConfig.py	2022-04-12 21:20:37 UTC (rev 292784)
+++ trunk/Tools/CISupport/ews-build/loadConfig.py	2022-04-12 21:36:14 UTC (rev 292785)
@@ -31,6 +31,8 @@
 from buildbot.worker import Worker
 from buildbot.util import identifiers as buildbot_identifiers
 from buildbot.changes.filter import ChangeFilter
+from datetime import datetime, timezone
+from twisted.internet import defer
 
 from factories import (APITestsFactory, BindingsFactory, BuildFactory, CommitQueueFactory, Factory, GTKBuildFactory,
GTKTestsFactory, JSCBuildFactory, JSCBuildAndTestsFactory, JSCTestsFactory, MergeQueueFactory, StressTestFactory,
@@ -113,9 +115,33 @@
 c['schedulers'].append(forceScheduler)
 
 
+# Copied from https://github.com/buildbot/buildbot/blob/master/master/buildbot/util/async_sort.py
+@defer.inlineCallbacks
+def async_sort(l, key, max_parallel=10):
+sem = defer.DeferredSemaphore(max_parallel)
+try:
+keys = yield defer.gatherResults([sem.run(key, i) for i in l])
+except defer.FirstError as e:
+raise e.subFailure.value
+
+keys = {id(l[i]): v for i, v in enumerate(keys)}
+l.sort(key=lambda x: keys[id(x)])
+
+
 def prioritizeBuilders(buildmaster, builders):
-# Prioritize builder queues over tester queues
-builders.sort(key=lambda b: 'build' in b.name.lower(), reverse=True)
+# Prioritize builder queues over tester queues.
+# Otherwise, prioritize older requests.
+# Inspired by https://docs.buildbot.net/latest/manual/customization.html#builder-priority-functions
+@defer.inlineCallbacks
+def key(b):
+request_time = yield b.getOldestRequestTime()
+return (
+'build' not in b.name.lower(),
+bool(b.building) or bool(b.old_building),
+request_time or datetime.now(timezone.utc),
+)
+
+async_sort(builders, key)
 return builders
 
 


Modified: trunk/Tools/CISupport/ews-build/loadConfig_unittest.py (292784 => 292785)

--- trunk/Tools/CISupport/ews-build/loadConfig_unittest.py	2022-04-12 21:20:37 UTC (rev 292784)
+++ trunk/Tools/CISupport/ews-build/loadConfig_unittest.py	2022-04-12 21:36:14 UTC (rev 292785)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python3
 #
-# Copyright (C) 2018-2021 Apple Inc. All rights reserved.
+# Copyright (C) 2018-2022 Apple Inc. All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
@@ -27,6 +27,9 @@
 import os
 import unittest
 
+from datetime import datetime, timedelta, timezone
+from twisted.internet import defer
+
 import loadConfig
 
 
@@ -246,5 +249,41 @@
 loadConfig.checkWorkersAndBuildersForConsistency({}, [self.ews101, {'name': 'ews102', 'platform': 'mac-sierra'}], [self.WK2Builder])
 
 
+class TestPrioritizeBuilders(unittest.TestCase):
+class MockBuilder(object):
+def __init__(self, name, building=False, oldestRequestTime=None):
+self.name = name
+self.building = building
+self.old_building = False
+self._oldestRequestTime = oldestRequestTime or datetime.now(timezone.utc)
+
+def getOldestRequestTime(self):
+return self._oldestRequestTime
+
+def test_builders_over_testers(self):
+builders = [
+self.MockBuilder('macOS-BigSur-Debug-Build-EWS'),
+self.MockBuilder('macOS-BigSur-Debug-WK1-Tests-EWS'),
+self.MockBuilder('macOS-BigSur-Release-Build-EWS'),
+]
+sorted_builders = loadConfig.prioritizeBuilders(None, builders)
+self.assertEqual(
+['macOS-BigSur-Debug-Build-EWS', 'macOS-BigSur-Release-Build-EWS', 'macOS-BigSur-Debug-WK1-Tests-EWS'],
+[builder.name for builder in sorted_builders],
+)
+
+def test_starvation(self):
+builders = [
+self.MockBuilder('Commit-Queue', oldestRequestTime=datetime.now(timezone.utc) - timedelta(seconds=30)),
+self.MockBuilder('Merge-Queue', 

[webkit-changes] [292755] trunk/Tools

2022-04-11 Thread jbedard
Title: [292755] trunk/Tools








Revision 292755
Author jbed...@apple.com
Date 2022-04-11 18:38:37 -0700 (Mon, 11 Apr 2022)


Log Message
[Merge-Queue] Build before landing
https://bugs.webkit.org/show_bug.cgi?id=239068


Reviewed by Ryan Haddad.

* Tools/CISupport/ews-build/factories.py:
(MergeQueueFactory.__init__): Build WebKit before landing.
* Tools/CISupport/ews-build/factories_unittest.py:
(TestExpectedBuildSteps):

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

Modified Paths

trunk/Tools/CISupport/ews-build/factories.py
trunk/Tools/CISupport/ews-build/factories_unittest.py
trunk/Tools/ChangeLog




Diff

Modified: trunk/Tools/CISupport/ews-build/factories.py (292754 => 292755)

--- trunk/Tools/CISupport/ews-build/factories.py	2022-04-12 01:34:15 UTC (rev 292754)
+++ trunk/Tools/CISupport/ews-build/factories.py	2022-04-12 01:38:37 UTC (rev 292755)
@@ -344,6 +344,10 @@
 def __init__(self, platform, **kwargs):
 super(MergeQueueFactory, self).__init__(platform, **kwargs)
 
+self.addStep(KillOldProcesses())
+self.addStep(CompileWebKit(skipUpload=True))
+self.addStep(KillOldProcesses())
+
 self.addStep(ValidateChange(verifyMergeQueue=True, verifyNoDraftForMergeQueue=True))
 self.addStep(Canonicalize())
 self.addStep(PushCommitToWebKitRepo())


Modified: trunk/Tools/CISupport/ews-build/factories_unittest.py (292754 => 292755)

--- trunk/Tools/CISupport/ews-build/factories_unittest.py	2022-04-12 01:34:15 UTC (rev 292754)
+++ trunk/Tools/CISupport/ews-build/factories_unittest.py	2022-04-12 01:38:37 UTC (rev 292755)
@@ -645,6 +645,9 @@
 'add-reviewer-to-changelog',
 'validate-commit-message',
 'validate-changelog-and-reviewer',
+'kill-old-processes',
+'compile-webkit',
+'kill-old-processes',
 'validate-change',
 'canonicalize-commit',
 'push-commit-to-webkit-repo',


Modified: trunk/Tools/ChangeLog (292754 => 292755)

--- trunk/Tools/ChangeLog	2022-04-12 01:34:15 UTC (rev 292754)
+++ trunk/Tools/ChangeLog	2022-04-12 01:38:37 UTC (rev 292755)
@@ -1,3 +1,16 @@
+2022-04-11  Jonathan Bedard  
+
+[Merge-Queue] Build before landing
+https://bugs.webkit.org/show_bug.cgi?id=239068
+
+
+Reviewed by Ryan Haddad.
+
+* CISupport/ews-build/factories.py:
+(MergeQueueFactory.__init__): Build WebKit before landing.
+* CISupport/ews-build/factories_unittest.py:
+(TestExpectedBuildSteps):
+
 2022-04-11  Chris Dumez  
 
 REGRESSION:(r292696) lldb_webkit_unittest.TestSummaryProviders.serial_test_WTFStringImpl_SummaryProvider_null_string is a constant failure






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [292634] trunk/Tools

2022-04-08 Thread jbedard
Title: [292634] trunk/Tools








Revision 292634
Author jbed...@apple.com
Date 2022-04-08 13:36:57 -0700 (Fri, 08 Apr 2022)


Log Message
[Merge-Queue] Create seperate queue for unsafe version
https://bugs.webkit.org/show_bug.cgi?id=239005


Reviewed by Aakash Jain.

* Tools/CISupport/ews-build/config.json: Add Unsafe-Merge-Queue.
* Tools/CISupport/ews-build/events.py:
(GitHubEventHandlerNoEdits):
(GitHubEventHandlerNoEdits.handle_pull_request): merge-queue and unsafe-merge-queue
should trigger different queues.
* Tools/CISupport/ews-build/factories.py:
(CommitQueueFactory.__init__):
(MergeQueueFactoryBase): Moved from MergeQueueFactory.
(MergeQueueFactory): Depend on MergeQueueFactoryBase.
(UnsafeMergeQueueFactory): Added.
(UnsafeMergeQueueFactory.__init__):
* Tools/CISupport/ews-build/factories_unittest.py:
(TestExpectedBuildSteps):
* Tools/CISupport/ews-build/loadConfig.py: Import UnsafeMergeQueueFactory.

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

Modified Paths

trunk/Tools/CISupport/ews-build/config.json
trunk/Tools/CISupport/ews-build/events.py
trunk/Tools/CISupport/ews-build/factories.py
trunk/Tools/CISupport/ews-build/factories_unittest.py
trunk/Tools/CISupport/ews-build/loadConfig.py
trunk/Tools/ChangeLog




Diff

Modified: trunk/Tools/CISupport/ews-build/config.json (292633 => 292634)

--- trunk/Tools/CISupport/ews-build/config.json	2022-04-08 20:32:23 UTC (rev 292633)
+++ trunk/Tools/CISupport/ews-build/config.json	2022-04-08 20:36:57 UTC (rev 292634)
@@ -335,6 +335,12 @@
   "factory": "MergeQueueFactory", "platform": "mac-bigsur",
   "configuration": "release", "architectures": ["x86_64"],
   "workernames": ["webkit-cq-01", "webkit-cq-02", "webkit-cq-03"]
+},
+{
+  "name": "Unsafe-Merge-Queue", "shortname": "unsafe-merge", "icon": "buildAndTest",
+  "factory": "UnsafeMergeQueueFactory", "platform": "mac-bigsur",
+  "configuration": "release", "architectures": ["arm64"],
+  "workernames": ["webkit-cq-01", "webkit-cq-02", "webkit-cq-03"]
 }
   ],
   "schedulers": [
@@ -367,6 +373,10 @@
   "builderNames": ["Merge-Queue"]
 },
 {
+  "type": "AnyBranchScheduler", "name": "unsafe_merge_queue",
+  "builderNames": ["Unsafe-Merge-Queue"]
+},
+{
   "type": "Triggerable", "name": "macos-bigsur-debug-build-ews",
   "builderNames": ["macOS-BigSur-Debug-Build-EWS"]
 },


Modified: trunk/Tools/CISupport/ews-build/events.py (292633 => 292634)

--- trunk/Tools/CISupport/ews-build/events.py	2022-04-08 20:32:23 UTC (rev 292633)
+++ trunk/Tools/CISupport/ews-build/events.py	2022-04-08 20:36:57 UTC (rev 292634)
@@ -312,7 +312,8 @@
 
 class GitHubEventHandlerNoEdits(GitHubEventHandler):
 OPEN_STATES = ('open',)
-MERGE_QUEUE_LABELS = ('merge-queue', 'unsafe-merge-queue')
+UNSAFE_MERGE_QUEUE_LABEL = 'unsafe-merge-queue'
+MERGE_QUEUE_LABEL = 'merge-queue'
 
 @classmethod
 def file_with_status_sign(cls, info):
@@ -355,9 +356,16 @@
 if state not in self.OPEN_STATES:
 log.msg("PR #{} is '{}', which triggers nothing".format(pr_number, state))
 return ([], 'git')
-if action == 'labeled' and any(label in self.MERGE_QUEUE_LABELS for label in labels):
+
+if action == 'labeled' and self.UNSAFE_MERGE_QUEUE_LABEL in labels:
+log.msg("PR #{} was labeled for unsafe-merge-queue".format(pr_number))
+# 'labeled' is usually an ignored action, override it to force build
+payload['action'] = 'synchronize'
+return super(GitHubEventHandlerNoEdits, self).handle_pull_request(payload, 'unsafe_merge_queue')
+if action == 'labeled' and self.MERGE_QUEUE_LABEL in labels:
 log.msg("PR #{} was labeled for merge-queue".format(pr_number))
 # 'labeled' is usually an ignored action, override it to force build
 payload['action'] = 'synchronize'
 return super(GitHubEventHandlerNoEdits, self).handle_pull_request(payload, 'merge_queue')
+
 return super(GitHubEventHandlerNoEdits, self).handle_pull_request(payload, event)


Modified: trunk/Tools/CISupport/ews-build/factories.py (292633 => 292634)

--- trunk/Tools/CISupport/ews-build/factories.py	2022-04-08 20:32:23 UTC (rev 292633)
+++ trunk/Tools/CISupport/ews-build/factories.py	2022-04-08 20:36:57 UTC (rev 292634)
@@ -317,9 +317,9 @@
 self.addStep(SetBuildSummary())
 
 
-class MergeQueueFactory(factory.BuildFactory):
+class MergeQueueFactoryBase(factory.BuildFactory):
 def __init__(self, platform, configuration=None, architectures=None, additionalArguments=None, **kwargs):
-factory.BuildFactory.__init__(self)
+super(MergeQueueFactoryBase, self).__init__()
 self.addStep(ConfigureBuild(platform=platform, configuration=configuration, architectures=architectures, buildOnly=False, triggers=None, remotes=None, additionalArguments=additionalArguments))
 

  1   2   3   4   5   6   7   8   9   10   >