Diff
Modified: trunk/Tools/ChangeLog (249601 => 249602)
--- trunk/Tools/ChangeLog 2019-09-07 00:24:17 UTC (rev 249601)
+++ trunk/Tools/ChangeLog 2019-09-07 00:42:34 UTC (rev 249602)
@@ -1,3 +1,17 @@
+2019-09-06 Matt Lewis <[email protected]>
+
+ Unreviewed, rolling out r249582.
+
+ This caused results.html fail to be created on internal
+ testers.
+
+ Reverted changeset:
+
+ "run-webkit-test: Allow results to be uploaded without scm
+ checkout"
+ https://bugs.webkit.org/show_bug.cgi?id=200787
+ https://trac.webkit.org/changeset/249582
+
2019-09-06 Aakash Jain <[email protected]>
[ews-app] Status bubble should only display important messages in pop-over - part 2
Modified: trunk/Tools/Scripts/webkitpy/common/checkout/scm/detection.py (249601 => 249602)
--- trunk/Tools/Scripts/webkitpy/common/checkout/scm/detection.py 2019-09-07 00:24:17 UTC (rev 249601)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/scm/detection.py 2019-09-07 00:42:34 UTC (rev 249602)
@@ -34,7 +34,6 @@
from .svn import SVN
from .git import Git
-from .stub_repository import StubRepository
_log = logging.getLogger(__name__)
@@ -75,9 +74,6 @@
if Git.in_working_directory(real_path, executive=self._executive):
return Git(cwd=real_path, patch_directories=patch_directories, filesystem=self._filesystem, executive=self._executive)
- if StubRepository.in_working_directory(real_path, filesystem=self._filesystem):
- return StubRepository(cwd=real_path, patch_directories=patch_directories, filesystem=self._filesystem, executive=self._executive)
-
return None
Deleted: trunk/Tools/Scripts/webkitpy/common/checkout/scm/stub_repository.py (249601 => 249602)
--- trunk/Tools/Scripts/webkitpy/common/checkout/scm/stub_repository.py 2019-09-07 00:24:17 UTC (rev 249601)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/scm/stub_repository.py 2019-09-07 00:42:34 UTC (rev 249602)
@@ -1,72 +0,0 @@
-# Copyright (c) 2019 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:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * 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 THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
-# OWNER OR 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.
-#
-# Python module for interacting with an SCM system (like SVN or Git)
-
-import logging
-import json
-
-from webkitpy.common.system.filesystem import FileSystem
-from .scm import SCM
-
-_log = logging.getLogger(__name__)
-
-
-class StubRepository(SCM):
- _stub_repository_json = 'checkout_information.json'
-
- def __init__(self, cwd, filesystem, **kwargs):
- self._filesystem = filesystem
-
- @classmethod
- def _find_parent_path_matching_callback_condition(cls, path, callback, filesystem=None):
- if not filesystem:
- filesystem = FileSystem()
- path = filesystem.abspath(path)
- while path:
- if filesystem.exists(filesystem.join(path, cls._stub_repository_json)):
- return callback(path)
- path = filesystem.dirname(path)
- return None
-
- @classmethod
- def in_working_directory(cls, path, executive=None, filesystem=None):
- return bool(cls._find_parent_path_matching_callback_condition(path, lambda path: True, filesystem=filesystem))
-
- def svn_revision(self, path):
- return self.native_revision(path)
-
- def native_revision(self, path):
- return self._find_parent_path_matching_callback_condition(path, lambda path: self._decode_json(path)['id'], filesystem=self._filesystem)
-
- def native_branch(self, path):
- return self._find_parent_path_matching_callback_condition(path, lambda path: self._decode_json(path)['branch'], filesystem=self._filesystem)
-
- def _decode_json(self, path):
- with self._filesystem.open_text_file_for_reading(self._filesystem.join(path, self._stub_repository_json)) as json_file:
- return json.load(json_file)
-
- def find_checkout_root(self, path):
- return self._find_parent_path_matching_callback_condition(path, lambda path: path, filesystem=self._filesystem)
Deleted: trunk/Tools/Scripts/webkitpy/common/checkout/scm/stub_repository_unittest.py (249601 => 249602)
--- trunk/Tools/Scripts/webkitpy/common/checkout/scm/stub_repository_unittest.py 2019-09-07 00:24:17 UTC (rev 249601)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/scm/stub_repository_unittest.py 2019-09-07 00:42:34 UTC (rev 249602)
@@ -1,71 +0,0 @@
-# Copyright (C) 2019 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.
-
-import unittest
-
-from webkitpy.common.system import filesystem_mock
-from .stub_repository import StubRepository
-
-mock_stub_repository_json = {'branch': 'trunk', 'id': '2738499'}
-
-FAKE_FILES = {
- '/TestDirectory/checkout_information.json': '{ "branch": "trunk", "id": "2738499" }',
- '/TestDirectory/test.txt': 'test',
- '/TestDirectory/TestDirectory2/test2.txt': 'test',
-}
-
-
-class StubRepositoryTest(unittest.TestCase):
-
- @staticmethod
- def mock_host_for_stub_repository():
- host = filesystem_mock.MockFileSystem(files=FAKE_FILES)
- return host
-
- def test_in_working_directory(self):
- host = StubRepositoryTest.mock_host_for_stub_repository()
- self.assertTrue(StubRepository.in_working_directory(path=host.join(host.getcwd(), 'TestDirectory', 'TestDirectory2'), filesystem=host))
-
- def test_native_revision(self):
- host = StubRepositoryTest.mock_host_for_stub_repository()
- repository = StubRepository(cwd=host.getcwd(), filesystem=host)
- self.assertEqual(repository.native_revision(path=host.join(host.getcwd(), 'TestDirectory', 'TestDirectory2')), mock_stub_repository_json['id'])
-
- def test_native_branch(self):
- host = StubRepositoryTest.mock_host_for_stub_repository()
- repository = StubRepository(cwd=host.getcwd(), filesystem=host)
- self.assertEqual(repository.native_branch(path=host.join(host.getcwd(), 'TestDirectory', 'TestDirectory2')), mock_stub_repository_json['branch'])
-
- def test_svn_revision(self):
- host = StubRepositoryTest.mock_host_for_stub_repository()
- repository = StubRepository(cwd=host.getcwd(), filesystem=host)
- self.assertEqual(repository.svn_revision(path=host.join(host.getcwd(), 'TestDirectory', 'TestDirectory2')), mock_stub_repository_json['id'])
-
- def test_find_checkout_root(self):
- host = StubRepositoryTest.mock_host_for_stub_repository()
- repository = StubRepository(cwd=host.getcwd(), filesystem=host)
- self.assertEquals(repository.find_checkout_root(path=host.join('TestDirectory', 'TestDirectory2')), host.join(host.getcwd(), 'TestDirectory'))
-
- def test_find_checkout_root_failure(self):
- host = StubRepositoryTest.mock_host_for_stub_repository()
- repository = StubRepository(cwd=host.getcwd(), filesystem=host)
- self.assertIsNone(repository.find_checkout_root(path=host.getcwd()))
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py (249601 => 249602)
--- trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py 2019-09-07 00:24:17 UTC (rev 249601)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py 2019-09-07 00:42:34 UTC (rev 249602)
@@ -444,6 +444,10 @@
in_directory: The directory where svn is to be run.
"""
+ # FIXME: We initialize this here in order to engage the stupid windows hacks :).
+ # We can't reuse an existing scm object because the specific directories may
+ # be part of other checkouts.
+ self._port.host.initialize_scm()
scm = SCMDetector(self._filesystem, self._executive).detect_scm_system(in_directory)
if scm:
return scm.svn_revision(in_directory)
Modified: trunk/Tools/Scripts/webkitpy/port/base.py (249601 => 249602)
--- trunk/Tools/Scripts/webkitpy/port/base.py 2019-09-07 00:24:17 UTC (rev 249601)
+++ trunk/Tools/Scripts/webkitpy/port/base.py 2019-09-07 00:42:34 UTC (rev 249602)
@@ -1603,6 +1603,8 @@
def commits_for_upload(self):
from webkitpy.results.upload import Upload
+ self.host.initialize_scm()
+
repos = {}
if port_config.apple_additions() and getattr(port_config.apple_additions(), 'repos', False):
repos = port_config.apple_additions().repos()