changeset 4237:39768309ed07

RT-31450: Merge with Webkit master (svn revision r150795) python fix
author Alexey Utkin <alexey.utkin@oracle.com>
date Fri, 05 Jul 2013 17:12:15 +0400
parents 8cbaf9096cda
children 7ffe66aa4523
files modules/web/src/main/native/Source/WebCore/TargetJava.pri modules/web/src/main/native/Tools/Scripts/webkitpy/common/checkout/changelog.py modules/web/src/main/native/Tools/Scripts/webkitpy/common/checkout/diff_parser.py modules/web/src/main/native/Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py modules/web/src/main/native/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py modules/web/src/main/native/Tools/Scripts/webkitpy/common/net/credentials.py modules/web/src/main/native/Tools/Scripts/webkitpy/common/system/autoinstall.py modules/web/src/main/native/Tools/Scripts/webkitpy/common/system/executive_unittest.py modules/web/src/main/native/Tools/Scripts/webkitpy/common/system/logutils.py modules/web/src/main/native/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py modules/web/src/main/native/Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py modules/web/src/main/native/Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py modules/web/src/main/native/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py modules/web/src/main/native/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py modules/web/src/main/native/Tools/Scripts/webkitpy/layout_tests/reftests/extract_reference_link_unittest.py modules/web/src/main/native/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py modules/web/src/main/native/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py modules/web/src/main/native/Tools/Scripts/webkitpy/layout_tests/servers/http_server.py modules/web/src/main/native/Tools/Scripts/webkitpy/layout_tests/servers/http_server_base.py modules/web/src/main/native/Tools/Scripts/webkitpy/layout_tests/views/printing.py modules/web/src/main/native/Tools/Scripts/webkitpy/performance_tests/perftestsrunner.py modules/web/src/main/native/Tools/Scripts/webkitpy/style/checker_unittest.py modules/web/src/main/native/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py modules/web/src/main/native/Tools/Scripts/webkitpy/style/checkers/test_expectations.py modules/web/src/main/native/Tools/Scripts/webkitpy/thirdparty/__init__.py modules/web/src/main/native/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/_stream_base.py modules/web/src/main/native/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/_stream_hybi.py modules/web/src/main/native/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/dispatch.py modules/web/src/main/native/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/extensions.py modules/web/src/main/native/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/handshake/_base.py modules/web/src/main/native/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/headerparserhandler.py modules/web/src/main/native/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/standalone.py modules/web/src/main/native/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/util.py modules/web/src/main/native/Tools/Scripts/webkitpy/tool/commands/download.py modules/web/src/main/native/Tools/Scripts/webkitpy/tool/commands/queues.py modules/web/src/main/native/Tools/Scripts/webkitpy/tool/commands/rebaseline.py modules/web/src/main/native/Tools/Scripts/webkitpy/tool/commands/suggestnominations.py modules/web/src/main/native/Tools/Scripts/webkitpy/tool/multicommandtool.py modules/web/src/main/native/Tools/Scripts/webkitpy/tool/servers/reflectionhandler.py modules/web/src/main/native/Tools/Scripts/webkitpy/tool/steps/preparechangelog.py modules/web/src/main/native/Tools/Scripts/webkitpy/tool/steps/runtests.py
diffstat 41 files changed, 294 insertions(+), 294 deletions(-) [+]
line wrap: on
line diff
--- a/modules/web/src/main/native/Source/WebCore/TargetJava.pri	Fri Jul 05 14:44:35 2013 +0400
+++ b/modules/web/src/main/native/Source/WebCore/TargetJava.pri	Fri Jul 05 17:12:15 2013 +0400
@@ -143,8 +143,8 @@
 # http://en.wikipedia.org/wiki/Relocation_%28computer_science%29
     QMAKE_LFLAGS += /BASE:0x6F000000 /DEF:$$PWD/WebCoreJava.def
 # TODO: remove debug!
-    QMAKE_CFLAGS += -Zi -Od
-    QMAKE_CXXFLAGS += -Zi -Od
+#    QMAKE_CFLAGS += -Zi -Od
+#    QMAKE_CXXFLAGS += -Zi -Od
 }
 
 linux-*|solaris-* {
@@ -1656,7 +1656,7 @@
         platform/image-decoders/ico/ICOImageDecoder.cpp \
         platform/image-decoders/jpeg/JPEGImageDecoder.cpp \
         platform/image-decoders/png/PNGImageDecoder.cpp \
-    platform/image-decoders/webp/WEBPImageDecoder.cpp
+        platform/image-decoders/webp/WEBPImageDecoder.cpp
 }
 
 SOURCES += \
@@ -2110,7 +2110,7 @@
             svg/SVGViewElement.cpp \
             svg/SVGViewSpec.cpp \
             svg/SVGZoomAndPan.cpp \
-            svg/SVGZoomEvent.cpp
+            svg/SVGZoomEvent.cpp    
 
     ALL_IN_ONE_SOURCES += \
         rendering/svg/RenderSVGAllInOne.cpp \
--- a/modules/web/src/main/native/Tools/Scripts/webkitpy/common/checkout/changelog.py	Fri Jul 05 14:44:35 2013 +0400
+++ b/modules/web/src/main/native/Tools/Scripts/webkitpy/common/checkout/changelog.py	Fri Jul 05 17:12:15 2013 +0400
@@ -388,17 +388,17 @@
         result = StringIO()
         with self._filesystem.open_text_file_for_reading(self.path) as file:
             for line in file:
-            if first_boilerplate_line_regexp.search(line):
-                message_lines = self._wrap_lines(message)
+                if first_boilerplate_line_regexp.search(line):
+                    message_lines = self._wrap_lines(message)
                     result.write(first_boilerplate_line_regexp.sub(message_lines, line))
-                # Remove all the ChangeLog boilerplate before the first changed
-                # file.
-                removing_boilerplate = True
-            elif removing_boilerplate:
-                if line.find('*') >= 0: # each changed file is preceded by a *
-                    removing_boilerplate = False
+                    # Remove all the ChangeLog boilerplate before the first changed
+                    # file.
+                    removing_boilerplate = True
+                elif removing_boilerplate:
+                    if line.find('*') >= 0:  # each changed file is preceded by a *
+                        removing_boilerplate = False
 
-            if not removing_boilerplate:
+                if not removing_boilerplate:
                     result.write(line)
         self._filesystem.write_text_file(self.path, result.getvalue())
 
@@ -414,14 +414,14 @@
             result = StringIO()
             with self._filesystem.open_text_file_for_reading(self.path) as file:
                 for line in file:
-                found_bug_url = re.search(config_urls.bug_url_long, line)
-                if not found_bug_url:
-                    found_bug_url = re.search(config_urls.bug_url_short, line)
+                    found_bug_url = re.search(config_urls.bug_url_long, line)
+                    if not found_bug_url:
+                        found_bug_url = re.search(config_urls.bug_url_short, line)
                     result.write(line)
-                if found_bug_url:
-                    if bug_url_number_of_items == 1:
+                    if found_bug_url:
+                        if bug_url_number_of_items == 1:
                             result.write("\n        Reviewed by %s.\n" % reviewer)
-                    bug_url_number_of_items -= 1
+                        bug_url_number_of_items -= 1
             self._filesystem.write_text_file(self.path, result.getvalue())
         else:
             data = self._filesystem.read_text_file(self.path)
@@ -435,7 +435,7 @@
         with self._filesystem.open_text_file_for_reading(self.path) as file:
             for line in file:
                 line = line.replace("Need a short description (OOPS!).", message)
-            if line != bug_boilerplate:
+                if line != bug_boilerplate:
                     result.write(line)
         self._filesystem.write_text_file(self.path, result.getvalue())
 
--- a/modules/web/src/main/native/Tools/Scripts/webkitpy/common/checkout/diff_parser.py	Fri Jul 05 14:44:35 2013 +0400
+++ b/modules/web/src/main/native/Tools/Scripts/webkitpy/common/checkout/diff_parser.py	Fri Jul 05 17:12:15 2013 +0400
@@ -80,15 +80,15 @@
 
     Args:
       lines: The lines of a diff file.
-                       If this line is git formatted, we'll return a
-                       converter from git to SVN.
+             If this line is git formatted, we'll return a
+             converter from git to SVN.
     """
     for i, line in enumerate(lines[:-1]):
         # Stop when we find the first patch
         if line[:3] == "+++" and lines[i + 1] == "---":
             break
         if match(r"^diff --git \w/", line):
-        return git_diff_to_svn_diff
+            return git_diff_to_svn_diff
     return svn_diff_to_svn_diff
 
 _INITIAL_STATE = 1
--- a/modules/web/src/main/native/Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py	Fri Jul 05 14:44:35 2013 +0400
+++ b/modules/web/src/main/native/Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py	Fri Jul 05 17:12:15 2013 +0400
@@ -895,13 +895,13 @@
             # the following technique with .svn/lock then svn update doesn't work with subversion client 1.7 or later
             pass
         else:
-        svn_root_lock_path = ".svn/lock"
-        write_into_file_at_path(svn_root_lock_path, "", "utf-8")
-        # webkit-patch uses a Checkout object and runs update-webkit, just use svn update here.
-        self.assertRaises(ScriptError, run_command, ['svn', 'update'])
+            svn_root_lock_path = ".svn/lock"
+            write_into_file_at_path(svn_root_lock_path, "", "utf-8")
+            # webkit-patch uses a Checkout object and runs update-webkit, just use svn update here.
+            self.assertRaises(ScriptError, run_command, ['svn', 'update'])
             self.scm.discard_working_directory_changes()
-        self.assertFalse(os.path.exists(svn_root_lock_path))
-        run_command(['svn', 'update'])  # Should succeed and not raise.
+            self.assertFalse(os.path.exists(svn_root_lock_path))
+            run_command(['svn', 'update'])  # Should succeed and not raise.
 
     def test_exists(self):
         self._shared_test_exists(self.scm, self.scm.commit_with_message)
--- a/modules/web/src/main/native/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py	Fri Jul 05 14:44:35 2013 +0400
+++ b/modules/web/src/main/native/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py	Fri Jul 05 17:12:15 2013 +0400
@@ -391,7 +391,7 @@
 
     def post_comment_to_bug(self, bug_id, comment_text, cc=None):
         _log.info("MOCK bug comment: bug_id=%s, cc=%s\n--- Begin comment ---\n%s\n--- End comment ---\n" % (
-            bug_id, cc, comment_text))
+                  bug_id, cc, comment_text))
 
     def add_attachment_to_bug(self, bug_id, file_or_string, description, filename=None, comment_text=None, mimetype=None):
         _log.info("MOCK add_attachment_to_bug: bug_id=%s, description=%s filename=%s mimetype=%s" %
@@ -410,7 +410,7 @@
                          mark_for_commit_queue=False,
                          mark_for_landing=False):
         _log.info("MOCK add_patch_to_bug: bug_id=%s, description=%s, mark_for_review=%s, mark_for_commit_queue=%s, mark_for_landing=%s" %
-            (bug_id, description, mark_for_review, mark_for_commit_queue, mark_for_landing))
+                  (bug_id, description, mark_for_review, mark_for_commit_queue, mark_for_landing))
         if comment_text:
             _log.info("-- Begin comment --")
             _log.info(comment_text)
--- a/modules/web/src/main/native/Tools/Scripts/webkitpy/common/net/credentials.py	Fri Jul 05 14:44:35 2013 +0400
+++ b/modules/web/src/main/native/Tools/Scripts/webkitpy/common/net/credentials.py	Fri Jul 05 17:12:15 2013 +0400
@@ -101,7 +101,7 @@
             security_command += ["-a", username]
 
         _log.info("Reading Keychain for %s account and password.  "
-            "Click \"Allow\" to continue..." % self.host)
+                  "Click \"Allow\" to continue..." % self.host)
         try:
             return self.executive.run_command(security_command)
         except ScriptError:
@@ -134,7 +134,7 @@
         if not User().confirm("Store password in system keyring?", User.DEFAULT_NO):
             return
         try:
-        self._keyring.set_password(self.host, username, password)
+            self._keyring.set_password(self.host, username, password)
         except:
             pass
 
@@ -152,7 +152,7 @@
 
         if username and not password and self._keyring:
             try:
-            password = self._keyring.get_password(self.host, username)
+                password = self._keyring.get_password(self.host, username)
             except:
                 pass
 
--- a/modules/web/src/main/native/Tools/Scripts/webkitpy/common/system/autoinstall.py	Fri Jul 05 14:44:35 2013 +0400
+++ b/modules/web/src/main/native/Tools/Scripts/webkitpy/common/system/autoinstall.py	Fri Jul 05 17:12:15 2013 +0400
@@ -125,11 +125,11 @@
             self._make_package(target_dir)
 
     def _make_package(self, target_dir):
-            init_path = os.path.join(target_dir, "__init__.py")
-            if not os.path.exists(init_path):
-                text = ("# This file is required for Python to search this "
-                        "directory for modules.\n")
-                self._write_file(init_path, text, "ascii")
+        init_path = os.path.join(target_dir, "__init__.py")
+        if not os.path.exists(init_path):
+            text = ("# This file is required for Python to search this "
+                    "directory for modules.\n")
+            self._write_file(init_path, text, "ascii")
 
     def _create_scratch_directory_inner(self, prefix):
         """Create a scratch directory without exception handling.
@@ -286,10 +286,10 @@
     def _download_to_stream(self, url, stream):
         failures = 0
         while True:
-        try:
-            netstream = urllib.urlopen(url)
+            try:
+                netstream = urllib.urlopen(url)
                 break
-        except IOError, err:
+            except IOError, err:
                 # Try multiple times
                 if failures < 5:
                     _log.warning("Failed to download %s, %s retrying" % (
@@ -297,14 +297,14 @@
                     failures += 1
                     continue
 
-            # Append existing Error message to new Error.
-            message = ('Could not download Python modules from URL "%s".\n'
-                       " Make sure you are connected to the internet.\n"
-                       " You must be connected to the internet when "
-                       "downloading needed modules for the first time.\n"
-                       " --> Inner message: %s"
-                       % (url, err))
-            raise IOError(message)
+                # Append existing Error message to new Error.
+                message = ('Could not download Python modules from URL "%s".\n'
+                           " Make sure you are connected to the internet.\n"
+                           " You must be connected to the internet when "
+                           "downloading needed modules for the first time.\n"
+                           " --> Inner message: %s"
+                           % (url, err))
+                raise IOError(message)
         code = 200
         if hasattr(netstream, "getcode"):
             code = netstream.getcode()
--- a/modules/web/src/main/native/Tools/Scripts/webkitpy/common/system/executive_unittest.py	Fri Jul 05 14:44:35 2013 +0400
+++ b/modules/web/src/main/native/Tools/Scripts/webkitpy/common/system/executive_unittest.py	Fri Jul 05 17:12:15 2013 +0400
@@ -181,7 +181,7 @@
             self.assertIn(process.wait(), (-signal.SIGABRT, -signal.SIGKILL))
         else:
             expected_exit_code = -signal.SIGKILL
-                self.assertEqual(process.wait(), expected_exit_code)
+            self.assertEqual(process.wait(), expected_exit_code)
 
         # Killing again should fail silently.
         executive.kill_process(process.pid)
--- a/modules/web/src/main/native/Tools/Scripts/webkitpy/common/system/logutils.py	Fri Jul 05 14:44:35 2013 +0400
+++ b/modules/web/src/main/native/Tools/Scripts/webkitpy/common/system/logutils.py	Fri Jul 05 17:12:15 2013 +0400
@@ -149,7 +149,7 @@
     # Create the handler.
     handler = logging.StreamHandler(stream)
     if logging_level == logging.DEBUG:
-    formatter = logging.Formatter("%(name)s: [%(levelname)s] %(message)s")
+        formatter = logging.Formatter("%(name)s: [%(levelname)s] %(message)s")
     else:
         formatter = logging.Formatter("%(message)s")
 
--- a/modules/web/src/main/native/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py	Fri Jul 05 14:44:35 2013 +0400
+++ b/modules/web/src/main/native/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py	Fri Jul 05 17:12:15 2013 +0400
@@ -201,9 +201,9 @@
             if self._options.retry_failures and tests_to_retry and not initial_results.interrupted:
                 enabled_pixel_tests_in_retry = self._force_pixel_tests_if_needed()
 
-            _log.info('')
+                _log.info('')
                 _log.info("Retrying %d unexpected failure(s) ..." % len(tests_to_retry))
-            _log.info('')
+                _log.info('')
                 retry_results = self._run_tests(tests_to_retry, tests_to_skip=set(), repeat_each=1, iterations=1,
                     num_workers=1, retrying=True)
 
--- a/modules/web/src/main/native/Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py	Fri Jul 05 14:44:35 2013 +0400
+++ b/modules/web/src/main/native/Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py	Fri Jul 05 17:12:15 2013 +0400
@@ -273,11 +273,11 @@
                 failures.append(test_failures.FailureImageHashMismatch())
                 driver_output.error = (driver_output.error or '') + err_str
             else:
-            driver_output.image_diff = diff_result[0]
-            if driver_output.image_diff:
-                failures.append(test_failures.FailureImageHashMismatch(diff_result[1]))
-            else:
-                # See https://bugs.webkit.org/show_bug.cgi?id=69444 for why this isn't a full failure.
+                driver_output.image_diff = diff_result[0]
+                if driver_output.image_diff:
+                    failures.append(test_failures.FailureImageHashMismatch(diff_result[1]))
+                else:
+                    # See https://bugs.webkit.org/show_bug.cgi?id=69444 for why this isn't a full failure.
                     _log.warning('  %s -> pixel hash failed (but diff passed)' % self._test_name)
         return failures
 
@@ -328,14 +328,14 @@
             if reference_driver_output.image_hash == actual_driver_output.image_hash:
                 diff_result = self._port.diff_image(reference_driver_output.image, actual_driver_output.image, tolerance=0)
                 if not diff_result[0]:
-                failures.append(test_failures.FailureReftestMismatchDidNotOccur(reference_filename))
+                    failures.append(test_failures.FailureReftestMismatchDidNotOccur(reference_filename))
                 else:
                     _log.warning("  %s -> ref test hashes matched but diff failed" % self._test_name)
 
         elif reference_driver_output.image_hash != actual_driver_output.image_hash:
             diff_result = self._port.diff_image(reference_driver_output.image, actual_driver_output.image, tolerance=0)
             if diff_result[0]:
-            failures.append(test_failures.FailureReftestMismatch(reference_filename))
+                failures.append(test_failures.FailureReftestMismatch(reference_filename))
             else:
                 _log.warning("  %s -> ref test hashes didn't match but diff passed" % self._test_name)
 
--- a/modules/web/src/main/native/Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py	Fri Jul 05 14:44:35 2013 +0400
+++ b/modules/web/src/main/native/Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py	Fri Jul 05 17:12:15 2013 +0400
@@ -278,7 +278,7 @@
         results_for_builder = results_json[builder_name]
 
         if builder_name:
-        self._insert_generic_metadata(results_for_builder)
+            self._insert_generic_metadata(results_for_builder)
 
         self._insert_failure_summaries(results_for_builder)
 
--- a/modules/web/src/main/native/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py	Fri Jul 05 14:44:35 2013 +0400
+++ b/modules/web/src/main/native/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py	Fri Jul 05 17:12:15 2013 +0400
@@ -182,7 +182,7 @@
             # the LayoutTests directory
             expectation_line.warnings.append('Path does not exist.')
             return False
-            return True
+        return True
 
     def _collect_matching_tests(self, expectation_line):
         """Convert the test specification to an absolute, normalized
@@ -267,7 +267,7 @@
         # special-case parsing this so that we fail immediately instead of treating this as a test name
         if remaining_string.startswith('//'):
             expectation_line.warnings = ['use "#" instead of "//" for comments']
-        return expectation_line
+            return expectation_line
 
         bugs = []
         modifiers = []
--- a/modules/web/src/main/native/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py	Fri Jul 05 14:44:35 2013 +0400
+++ b/modules/web/src/main/native/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py	Fri Jul 05 17:12:15 2013 +0400
@@ -572,7 +572,7 @@
         expectation = TestExpectationLine()
 
         self.assertEqual(expectation.to_string(self._converter), '')
-        expectation.comment = 'Qux.'
+        expectation.comment = ' Qux.'
         self.assertEqual(expectation.to_string(self._converter), '# Qux.')
         expectation.name = 'bar'
         self.assertEqual(expectation.to_string(self._converter), 'bar # Qux.')
--- a/modules/web/src/main/native/Tools/Scripts/webkitpy/layout_tests/reftests/extract_reference_link_unittest.py	Fri Jul 05 14:44:35 2013 +0400
+++ b/modules/web/src/main/native/Tools/Scripts/webkitpy/layout_tests/reftests/extract_reference_link_unittest.py	Fri Jul 05 17:12:15 2013 +0400
@@ -56,9 +56,9 @@
 """
         matches, mismatches = extract_reference_link.get_reference_link(html_1)
         self.assertItemsEqual(matches,
-                         ["green-box-ref.xht", "blue-box-ref.xht"])
+                              ["green-box-ref.xht", "blue-box-ref.xht"])
         self.assertItemsEqual(mismatches,
-                         ["red-box-notref.xht", "red-box-notref.xht"])
+                              ["red-box-notref.xht", "red-box-notref.xht"])
 
         html_2 = ""
         empty_tuple_1 = extract_reference_link.get_reference_link(html_2)
--- a/modules/web/src/main/native/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py	Fri Jul 05 14:44:35 2013 +0400
+++ b/modules/web/src/main/native/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py	Fri Jul 05 17:12:15 2013 +0400
@@ -69,7 +69,7 @@
         from webkitpy.layout_tests.lint_test_expectations import lint
         return lint(host, options, stderr)
 
-        try:
+    try:
         port = host.port_factory.get(options.platform, options)
     except NotImplementedError, e:
         # FIXME: is this the best way to handle unsupported port names?
@@ -352,7 +352,7 @@
             filesystem = port.host.filesystem
             if not filesystem.isdir(filesystem.join(port.layout_tests_dir(), directory)):
                 _log.warning("'%s' was passed to --pixel-test-directories, which doesn't seem to be a directory" % str(directory))
-    else:
+            else:
                 varified_dirs.add(directory)
 
         options.pixel_test_directories = list(varified_dirs)
--- a/modules/web/src/main/native/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py	Fri Jul 05 14:44:35 2013 +0400
+++ b/modules/web/src/main/native/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py	Fri Jul 05 17:12:15 2013 +0400
@@ -58,7 +58,7 @@
 
 def parse_args(extra_args=None, tests_included=False, new_results=False, print_nothing=True):
     extra_args = extra_args or []
-        args = []
+    args = []
     if not '--platform' in extra_args:
         args.extend(['--platform', 'test'])
     if not new_results:
@@ -764,7 +764,7 @@
         host = MockHost()
         host.filesystem.write_text_file('/tmp/overrides.txt', 'Bug(x) failures/unexpected/mismatch.html [ ImageOnlyFailure ]\n')
         self.assertTrue(passing_run(['--additional-expectations', '/tmp/overrides.txt', 'failures/unexpected/mismatch.html'],
-                                     tests_included=True, host=host))
+                                    tests_included=True, host=host))
 
     def test_no_http_and_force(self):
         # See test_run_force, using --force raises an exception.
@@ -885,7 +885,7 @@
         host = MockHost()
         details, err, _ = logging_run(
             ['--pixel-tests', '--reset-results', 'passes/image.html', 'failures/expected/missing_image.html'],
-                        tests_included=True, host=host, new_results=True)
+            tests_included=True, host=host, new_results=True)
         file_list = host.filesystem.written_files.keys()
         self.assertEqual(details.exit_code, 0)
         self.assertEqual(len(file_list), 8)
@@ -897,11 +897,11 @@
         # is missing, update the expected generic location.
         host = MockHost()
         details, err, _ = logging_run(['--no-show-results',
-                     'failures/unexpected/missing_text.html',
-                     'failures/unexpected/missing_image.html',
-                     'failures/unexpected/missing_audio.html',
-                     'failures/unexpected/missing_render_tree_dump.html'],
-                     tests_included=True, host=host, new_results=True)
+            'failures/unexpected/missing_text.html',
+            'failures/unexpected/missing_image.html',
+            'failures/unexpected/missing_audio.html',
+            'failures/unexpected/missing_render_tree_dump.html'],
+            tests_included=True, host=host, new_results=True)
         file_list = host.filesystem.written_files.keys()
         self.assertEqual(details.exit_code, 0)
         self.assertEqual(len(file_list), 10)
@@ -915,7 +915,7 @@
         host = MockHost()
         details, err, _ = logging_run(
             ['--pixel-tests', '--new-baseline', 'passes/image.html', 'failures/expected/missing_image.html'],
-                    tests_included=True, host=host, new_results=True)
+            tests_included=True, host=host, new_results=True)
         file_list = host.filesystem.written_files.keys()
         self.assertEqual(details.exit_code, 0)
         self.assertEqual(len(file_list), 8)
--- a/modules/web/src/main/native/Tools/Scripts/webkitpy/layout_tests/servers/http_server.py	Fri Jul 05 14:44:35 2013 +0400
+++ b/modules/web/src/main/native/Tools/Scripts/webkitpy/layout_tests/servers/http_server.py	Fri Jul 05 17:12:15 2013 +0400
@@ -223,6 +223,6 @@
                 # If this is actually working, we should figure out a clean API.
                 self._executive.run_command(["taskkill.exe", "/f", "/t", "/pid", self._pid], error_handler=self._executive.ignore_error)
             else:
-            self._executive.kill_process(self._pid)
+                self._executive.kill_process(self._pid)
             return False
         return True
--- a/modules/web/src/main/native/Tools/Scripts/webkitpy/layout_tests/servers/http_server_base.py	Fri Jul 05 14:44:35 2013 +0400
+++ b/modules/web/src/main/native/Tools/Scripts/webkitpy/layout_tests/servers/http_server_base.py	Fri Jul 05 17:12:15 2013 +0400
@@ -76,8 +76,8 @@
         # Stop any stale servers left over from previous instances.
         if self._filesystem.exists(self._pid_file):
             try:
-            self._pid = int(self._filesystem.read_text_file(self._pid_file))
-            self._stop_running_server()
+                self._pid = int(self._filesystem.read_text_file(self._pid_file))
+                self._stop_running_server()
             except (ValueError, UnicodeDecodeError):
                 # These could be raised if the pid file is corrupt.
                 self._remove_pid_file()
@@ -99,33 +99,33 @@
         """Stops the server. Stopping a server that isn't started is harmless."""
         actual_pid = None
         try:
-        if self._filesystem.exists(self._pid_file):
+            if self._filesystem.exists(self._pid_file):
                 try:
-            actual_pid = int(self._filesystem.read_text_file(self._pid_file))
+                    actual_pid = int(self._filesystem.read_text_file(self._pid_file))
                 except (ValueError, UnicodeDecodeError):
                     # These could be raised if the pid file is corrupt.
                     pass
+                if not self._pid:
+                    self._pid = actual_pid
+
             if not self._pid:
-                self._pid = actual_pid
+                return
 
-        if not self._pid:
-            return
+            if not actual_pid:
+                _log.warning('Failed to stop %s: pid file is missing' % self._name)
+                return
+            if self._pid != actual_pid:
+                _log.warning('Failed to stop %s: pid file contains %d, not %d' %
+                            (self._name, actual_pid, self._pid))
+                # Try to kill the existing pid, anyway, in case it got orphaned.
+                self._executive.kill_process(self._pid)
+                self._pid = None
+                return
 
-        if not actual_pid:
-            _log.warning('Failed to stop %s: pid file is missing' % self._name)
-            return
-        if self._pid != actual_pid:
-            _log.warning('Failed to stop %s: pid file contains %d, not %d' %
-                         (self._name, actual_pid, self._pid))
-            # Try to kill the existing pid, anyway, in case it got orphaned.
-            self._executive.kill_process(self._pid)
+            _log.debug("Attempting to shut down %s server at pid %d" % (self._name, self._pid))
+            self._stop_running_server()
+            _log.debug("%s server at pid %d stopped" % (self._name, self._pid))
             self._pid = None
-            return
-
-        _log.debug("Attempting to shut down %s server at pid %d" % (self._name, self._pid))
-        self._stop_running_server()
-        _log.debug("%s server at pid %d stopped" % (self._name, self._pid))
-        self._pid = None
         finally:
             # Make sure we delete the pid file no matter what happens.
             self._remove_pid_file()
--- a/modules/web/src/main/native/Tools/Scripts/webkitpy/layout_tests/views/printing.py	Fri Jul 05 14:44:35 2013 +0400
+++ b/modules/web/src/main/native/Tools/Scripts/webkitpy/layout_tests/views/printing.py	Fri Jul 05 17:12:15 2013 +0400
@@ -50,7 +50,7 @@
                              help='print detailed results for every test'),
         optparse.make_option('--debug-rwt-logging', action='store_true', default=False,
                              help='print timestamps and debug information for run-webkit-tests itself'),
-   ]
+    ]
 
 
 class Printer(object):
@@ -92,7 +92,7 @@
             self._print_default("Pixel tests disabled")
 
         self._print_default("Regular timeout: %s, slow test timeout: %s" %
-                           (self._options.time_out_ms, self._options.slow_time_out_ms))
+                  (self._options.time_out_ms, self._options.slow_time_out_ms))
 
         self._print_default('Command line: ' + ' '.join(self._port.driver_cmd_line()))
         self._print_default('')
--- a/modules/web/src/main/native/Tools/Scripts/webkitpy/performance_tests/perftestsrunner.py	Fri Jul 05 14:44:35 2013 +0400
+++ b/modules/web/src/main/native/Tools/Scripts/webkitpy/performance_tests/perftestsrunner.py	Fri Jul 05 17:12:15 2013 +0400
@@ -145,9 +145,9 @@
         paths = []
         for arg in self._args:
             if filesystem.exists(filesystem.join(self._base_path, arg)):
-            paths.append(arg)
+                paths.append(arg)
             else:
-            relpath = filesystem.relpath(arg, self._base_path)
+                relpath = filesystem.relpath(arg, self._base_path)
                 if filesystem.exists(filesystem.join(self._base_path, relpath)):
                     paths.append(filesystem.normpath(relpath))
                 else:
@@ -185,12 +185,12 @@
         while (run_count < repeat):
             run_count += 1
 
-        tests = self._collect_tests()
+            tests = self._collect_tests()
             runs = ' (Run %d of %d)' % (run_count, repeat) if repeat > 1 else ''
             _log.info("Running %d tests%s" % (len(tests), runs))
 
-        for test in tests:
-            if not test.prepare(self._options.time_out_ms):
+            for test in tests:
+                if not test.prepare(self._options.time_out_ms):
                     return self.EXIT_CODE_BAD_PREPARATION
 
             try:
@@ -304,7 +304,7 @@
             _log.error("Missing slave configuration JSON file: %s" % slave_config_json_path)
             return None
 
-            try:
+        try:
             slave_config_json = self._host.filesystem.open_text_file_for_reading(slave_config_json_path)
             slave_config = json.load(slave_config_json)
             for key in slave_config:
@@ -339,9 +339,9 @@
                 parsed_response = json.loads('\n'.join(response_body))
             except:
                 _log.error("Uploaded JSON to %s but got a bad response:" % url)
-            for line in response_body:
-                _log.error(line)
-            return False
+                for line in response_body:
+                    _log.error(line)
+                return False
             if parsed_response.get('status') != 'OK':
                 _log.error("Uploaded JSON to %s but got an error:" % url)
                 _log.error(json.dumps(parsed_response, indent=4))
@@ -361,7 +361,7 @@
             metrics = test.run(self._options.time_out_ms)
             if metrics:
                 self._results.append((test, metrics))
-        else:
+            else:
                 failures += 1
                 _log.error('FAILED')
 
--- a/modules/web/src/main/native/Tools/Scripts/webkitpy/style/checker_unittest.py	Fri Jul 05 14:44:35 2013 +0400
+++ b/modules/web/src/main/native/Tools/Scripts/webkitpy/style/checker_unittest.py	Fri Jul 05 17:12:15 2013 +0400
@@ -275,7 +275,7 @@
         all_categories = self._all_categories()
         for category in _MAX_REPORTS_PER_CATEGORY.iterkeys():
             self.assertIn(category, all_categories,
-                            'Key "%s" is not a category' % category)
+                          'Key "%s" is not a category' % category)
 
 
 class CheckWebKitStyleFunctionTest(unittest.TestCase):
--- a/modules/web/src/main/native/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py	Fri Jul 05 14:44:35 2013 +0400
+++ b/modules/web/src/main/native/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py	Fri Jul 05 17:12:15 2013 +0400
@@ -1127,16 +1127,16 @@
         self.assert_multi_line_lint(
             '''\
             class Foo {
-                 Foo(int f);
-               };''',
+                Foo(int f);
+            };''',
             'Single-argument constructors should be marked explicit.'
             '  [runtime/explicit] [5]')
         # missing explicit is bad, even with whitespace
         self.assert_multi_line_lint(
             '''\
             class Foo {
-                 Foo (int f);
-               };''',
+                Foo (int f);
+            };''',
             ['Extra space before ( in function call  [whitespace/parens] [4]',
              'Single-argument constructors should be marked explicit.'
              '  [runtime/explicit] [5]'])
@@ -1144,92 +1144,92 @@
         self.assert_multi_line_lint(
             '''\
             class Foo {
-                 Foo(int f); // simpler than Foo(blargh, blarg)
-               };''',
+                Foo(int f); // simpler than Foo(blargh, blarg)
+            };''',
             'Single-argument constructors should be marked explicit.'
             '  [runtime/explicit] [5]')
         # missing explicit, with qualified classname
         self.assert_multi_line_lint(
             '''\
             class Qualifier::AnotherOne::Foo {
-                 Foo(int f);
-               };''',
+                Foo(int f);
+            };''',
             'Single-argument constructors should be marked explicit.'
             '  [runtime/explicit] [5]')
         # structs are caught as well.
         self.assert_multi_line_lint(
             '''\
             struct Foo {
-                 Foo(int f);
-               };''',
+                Foo(int f);
+            };''',
             'Single-argument constructors should be marked explicit.'
             '  [runtime/explicit] [5]')
         # Templatized classes are caught as well.
         self.assert_multi_line_lint(
             '''\
             template<typename T> class Foo {
-                 Foo(int f);
-               };''',
+                Foo(int f);
+            };''',
             'Single-argument constructors should be marked explicit.'
             '  [runtime/explicit] [5]')
         # proper style is okay
         self.assert_multi_line_lint(
             '''\
             class Foo {
-                 explicit Foo(int f);
-               };''',
+                explicit Foo(int f);
+            };''',
             '')
         # two argument constructor is okay
         self.assert_multi_line_lint(
             '''\
             class Foo {
-                 Foo(int f, int b);
-               };''',
+                Foo(int f, int b);
+            };''',
             '')
         # two argument constructor, across two lines, is okay
         self.assert_multi_line_lint(
             '''\
             class Foo {
-                 Foo(int f,
-                     int b);
-               };''',
+                Foo(int f,
+                    int b);
+            };''',
             '')
         # non-constructor (but similar name), is okay
         self.assert_multi_line_lint(
             '''\
             class Foo {
-                 aFoo(int f);
-               };''',
+                aFoo(int f);
+            };''',
             '')
         # constructor with void argument is okay
         self.assert_multi_line_lint(
             '''\
             class Foo {
-                 Foo(void);
-               };''',
+                Foo(void);
+            };''',
             '')
         # single argument method is okay
         self.assert_multi_line_lint(
             '''\
             class Foo {
-                 Bar(int b);
-               };''',
+                Bar(int b);
+            };''',
             '')
         # comments should be ignored
         self.assert_multi_line_lint(
             '''\
             class Foo {
-               // Foo(int f);
-               };''',
+            // Foo(int f);
+            };''',
             '')
         # single argument function following class definition is okay
         # (okay, it's not actually valid, but we don't want a false positive)
         self.assert_multi_line_lint(
             '''\
             class Foo {
-                 Foo(int f, int b);
-               };
-               Foo(int f);''',
+                Foo(int f, int b);
+            };
+            Foo(int f);''',
             '')
         # single argument function is okay
         self.assert_multi_line_lint(
@@ -1239,14 +1239,14 @@
         self.assert_multi_line_lint(
             '''\
             class Foo {
-                 Foo(const Foo&);
-               };''',
+                Foo(const Foo&);
+            };''',
             '')
         self.assert_multi_line_lint(
             '''\
             class Foo {
-                 Foo(Foo&);
-               };''',
+                Foo(Foo&);
+            };''',
             '')
 
     def test_slash_star_comment_on_single_line(self):
@@ -1398,25 +1398,25 @@
         self.assert_lint(
             '''\
             const int foo[] =
-                   {1, 2, 3 };''',
+                {1, 2, 3 };''',
             '')
         # For single line, unmatched '}' with a ';' is ignored (not enough context)
         self.assert_multi_line_lint(
             '''\
             int a[3] = { 1,
-                            2,
-                            3 };''',
+                2,
+                3 };''',
             '')
         self.assert_multi_line_lint(
             '''\
             int a[2][3] = { { 1, 2 },
-                             { 3, 4 } };''',
+                { 3, 4 } };''',
             '')
         self.assert_multi_line_lint(
             '''\
             int a[2][3] =
-                   { { 1, 2 },
-                     { 3, 4 } };''',
+                { { 1, 2 },
+                { 3, 4 } };''',
             '')
 
     # CHECK/EXPECT_TRUE/EXPECT_FALSE replacements
@@ -1770,7 +1770,7 @@
         self.assert_lint('default:;',
                          'Semicolon defining empty statement. Use { } instead.'
                          '  [whitespace/semicolon] [5]')
-        self.assert_lint('      ;',
+        self.assert_lint('        ;',
                          'Line contains only semicolon. If this should be an empty '
                          'statement, use { } instead.'
                          '  [whitespace/semicolon] [5]')
@@ -1812,10 +1812,10 @@
                          '    VeryLongNameType veryLongNameVariable) { }', '')
         self.assert_lint('template<>\n'
                          'string FunctionTemplateSpecialization<SomeType>(\n'
-                         '      int x) { return ""; }', '')
+                         '    int x) { return ""; }', '')
         self.assert_lint('template<>\n'
                          'string FunctionTemplateSpecialization<vector<A::B>* >(\n'
-                         '      int x) { return ""; }', '')
+                         '    int x) { return ""; }', '')
 
         # should not catch methods of template classes.
         self.assert_lint('string Class<Type>::Method() const\n'
@@ -2045,7 +2045,7 @@
         self.assert_lint(' char* oneSpaceIndent = "public:";',
                          'Weird number of spaces at line-start.  '
                          'Are you using a 4-space indent?  [whitespace/indent] [3]')
-        self.assert_lint('public:',
+        self.assert_lint(' public:',
                          'Weird number of spaces at line-start.  '
                          'Are you using a 4-space indent?  [whitespace/indent] [3]')
         self.assert_lint('  public:',
@@ -2105,7 +2105,7 @@
         self.assert_multi_line_lint(
             '''\
             struct Foo*
-                 foo = NewFoo();''',
+                foo = NewFoo();''',
             '')
         # Here is an example where the linter gets confused, even though
         # the code doesn't violate the style guide.
@@ -3188,33 +3188,33 @@
         self.assert_multi_line_lint(
             '''\
                 class Foo {
-                   virtual ~Foo();
-                   virtual void foo();
-               };''',
+                    virtual ~Foo();
+                    virtual void foo();
+                };''',
             '')
 
         self.assert_multi_line_lint(
             '''\
                 class Foo {
-                   virtual inline ~Foo();
-                   virtual void foo();
-               };''',
+                    virtual inline ~Foo();
+                    virtual void foo();
+                };''',
             '')
 
         self.assert_multi_line_lint(
             '''\
                 class Foo {
-                   inline virtual ~Foo();
-                   virtual void foo();
-               };''',
+                    inline virtual ~Foo();
+                    virtual void foo();
+                };''',
             '')
 
         self.assert_multi_line_lint(
             '''\
                 class Foo::Goo {
-                   virtual ~Goo();
-                   virtual void goo();
-               };''',
+                    virtual ~Goo();
+                    virtual void goo();
+                };''',
             '')
         self.assert_multi_line_lint(
             'class Foo { void foo(); };',
@@ -3236,16 +3236,16 @@
         self.assert_multi_line_lint(
             '''\
                 class Qualified::Goo : public Foo {
-                   virtual void goo();
-               };''',
+                    virtual void goo();
+                };''',
             '')
 
     def test_no_destructor_when_virtual_needed(self):
         self.assert_multi_line_lint_re(
             '''\
                 class Foo {
-                   virtual void foo();
-               };''',
+                    virtual void foo();
+                };''',
             'The class Foo probably needs a virtual destructor')
 
     def test_enum_casing(self):
@@ -3304,74 +3304,74 @@
         self.assert_multi_line_lint_re(
             '''\
                 class Foo {
-                   ~Foo();
-                   virtual void foo();
-               };''',
+                    ~Foo();
+                    virtual void foo();
+                };''',
             'The class Foo probably needs a virtual destructor')
 
     def test_no_warn_when_derived(self):
         self.assert_multi_line_lint(
             '''\
                 class Foo : public Goo {
-                   virtual void foo();
-               };''',
+                    virtual void foo();
+                };''',
             '')
 
     def test_internal_braces(self):
         self.assert_multi_line_lint_re(
             '''\
                 class Foo {
-                   enum Goo {
+                    enum Goo {
                         Goo
-                   };
-                   virtual void foo();
-               };''',
+                    };
+                    virtual void foo();
+                };''',
             'The class Foo probably needs a virtual destructor')
 
     def test_inner_class_needs_virtual_destructor(self):
         self.assert_multi_line_lint_re(
             '''\
                 class Foo {
-                   class Goo {
-                       virtual void goo();
-                   };
-               };''',
+                    class Goo {
+                        virtual void goo();
+                    };
+                };''',
             'The class Goo probably needs a virtual destructor')
 
     def test_outer_class_needs_virtual_destructor(self):
         self.assert_multi_line_lint_re(
             '''\
                 class Foo {
-                   class Goo {
-                   };
-                   virtual void foo();
-               };''',
+                    class Goo {
+                    };
+                    virtual void foo();
+                };''',
             'The class Foo probably needs a virtual destructor')
 
     def test_qualified_class_needs_virtual_destructor(self):
         self.assert_multi_line_lint_re(
             '''\
                 class Qualified::Foo {
-                   virtual void foo();
-               };''',
+                    virtual void foo();
+                };''',
             'The class Qualified::Foo probably needs a virtual destructor')
 
     def test_multi_line_declaration_no_error(self):
         self.assert_multi_line_lint_re(
             '''\
                 class Foo
-                   : public Goo {
-                   virtual void foo();
-               };''',
+                    : public Goo {
+                    virtual void foo();
+                };''',
             '')
 
     def test_multi_line_declaration_with_error(self):
         self.assert_multi_line_lint(
             '''\
                 class Foo
-               {
-                   virtual void foo();
-               };''',
+                {
+                    virtual void foo();
+                };''',
             ['This { should be at the end of the previous line  '
              '[whitespace/braces] [4]',
              'The class Foo probably needs a virtual destructor due to having '
@@ -3896,7 +3896,7 @@
             'More than one command on the same line  [whitespace/newline] [4]')
         # Ignore preprocessor if's.
         self.assert_multi_line_lint(
-            '    #if (condition) || (condition2)\n',
+            '#if (condition) || (condition2)\n',
             '')
 
         # 2. An else statement should go on the same line as a preceding
@@ -4790,12 +4790,12 @@
         self.assertEqual('',
             self.perform_lint(
                 '{}\n'
-                                            'WEBKIT_EXPORT\n'
-                                            'virtual\n'
-                                            'int\n'
-                                            'foo() = 0;\n',
-                                            'test.h',
-                                            webkit_export_error_rules))
+                'WEBKIT_EXPORT\n'
+                'virtual\n'
+                'int\n'
+                'foo() = 0;\n',
+                'test.h',
+                webkit_export_error_rules))
 
     def test_other(self):
         # FIXME: Implement this.
--- a/modules/web/src/main/native/Tools/Scripts/webkitpy/style/checkers/test_expectations.py	Fri Jul 05 14:44:35 2013 +0400
+++ b/modules/web/src/main/native/Tools/Scripts/webkitpy/style/checkers/test_expectations.py	Fri Jul 05 17:12:15 2013 +0400
@@ -56,7 +56,7 @@
             for port in ports:
                 for test_expectation_file in port.expectations_files():
                     if test_expectation_file.replace(port.path_from_webkit_base() + host.filesystem.sep, '') == expectations_path:
-                return port
+                        return port
         return None
 
     def __init__(self, file_path, handle_style_error, host=None):
--- a/modules/web/src/main/native/Tools/Scripts/webkitpy/thirdparty/__init__.py	Fri Jul 05 14:44:35 2013 +0400
+++ b/modules/web/src/main/native/Tools/Scripts/webkitpy/thirdparty/__init__.py	Fri Jul 05 17:12:15 2013 +0400
@@ -96,11 +96,11 @@
 
     def _install_mechanize(self):
         return self._install("http://pypi.python.org/packages/source/m/mechanize/mechanize-0.2.5.tar.gz",
-                      "mechanize-0.2.5/mechanize")
+                             "mechanize-0.2.5/mechanize")
 
     def _install_pep8(self):
         return self._install("http://pypi.python.org/packages/source/p/pep8/pep8-0.5.0.tar.gz#md5=512a818af9979290cd619cce8e9c2e2b",
-                      "pep8-0.5.0/pep8.py")
+                             "pep8-0.5.0/pep8.py")
 
     def _install_pylint(self):
         self._ensure_autoinstalled_dir_is_in_sys_path()
@@ -128,12 +128,12 @@
         jinja_dir = self._fs.join(_AUTOINSTALLED_DIR, "jinja2")
         installer = AutoInstaller(append_to_search_path=True, target_dir=jinja_dir)
         did_install_something = installer.install(url="http://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.6.tar.gz#md5=1c49a8825c993bfdcf55bb36897d28a2",
-                          url_subpath="Jinja2-2.6/jinja2")
+                                                url_subpath="Jinja2-2.6/jinja2")
 
         SQLAlchemy_dir = self._fs.join(_AUTOINSTALLED_DIR, "sqlalchemy")
         installer = AutoInstaller(append_to_search_path=True, target_dir=SQLAlchemy_dir)
         did_install_something |= installer.install(url="http://pypi.python.org/packages/source/S/SQLAlchemy/SQLAlchemy-0.7.7.tar.gz#md5=ddf6df7e014cea318fa981364f3f93b9",
-                          url_subpath="SQLAlchemy-0.7.7/lib/sqlalchemy")
+                                                 url_subpath="SQLAlchemy-0.7.7/lib/sqlalchemy")
 
         did_install_something |= self._install("http://pypi.python.org/packages/source/b/buildbot/buildbot-0.8.6p1.tar.gz#md5=b6727d2810c692062c657492bcbeac6a", "buildbot-0.8.6p1/buildbot")
         return did_install_something
@@ -152,7 +152,7 @@
         irc_dir = self._fs.join(_AUTOINSTALLED_DIR, "irc")
         installer = AutoInstaller(target_dir=irc_dir)
         did_install_something = installer.install(url="http://downloads.sourceforge.net/project/python-irclib/python-irclib/0.4.8/python-irclib-0.4.8.zip",
-                          url_subpath="irclib.py")
+                                                url_subpath="irclib.py")
         did_install_something |= installer.install(url="http://downloads.sourceforge.net/project/python-irclib/python-irclib/0.4.8/python-irclib-0.4.8.zip",
                           url_subpath="ircbot.py")
         return did_install_something
--- a/modules/web/src/main/native/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/_stream_base.py	Fri Jul 05 14:44:35 2013 +0400
+++ b/modules/web/src/main/native/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/_stream_base.py	Fri Jul 05 17:12:15 2013 +0400
@@ -114,9 +114,9 @@
         try:
             read_bytes = self._request.connection.read(length)
             if not read_bytes:
-            raise ConnectionTerminatedException(
-                'Receiving %d byte failed. Peer (%r) closed connection' %
-                (length, (self._request.connection.remote_addr,)))
+                raise ConnectionTerminatedException(
+                    'Receiving %d byte failed. Peer (%r) closed connection' %
+                    (length, (self._request.connection.remote_addr,)))
             return read_bytes
         except socket.error, e:
             # Catch a socket.error. Because it's not a child class of the
--- a/modules/web/src/main/native/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/_stream_hybi.py	Fri Jul 05 14:44:35 2013 +0400
+++ b/modules/web/src/main/native/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/_stream_hybi.py	Fri Jul 05 17:12:15 2013 +0400
@@ -514,7 +514,7 @@
             MAX_PAYLOAD_DATA_SIZE = -1
 
             if MAX_PAYLOAD_DATA_SIZE <= 0:
-            self._write(self._writer.build(message, end, binary))
+                self._write(self._writer.build(message, end, binary))
                 return
 
             bytes_written = 0
--- a/modules/web/src/main/native/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/dispatch.py	Fri Jul 05 14:44:35 2013 +0400
+++ b/modules/web/src/main/native/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/dispatch.py	Fri Jul 05 17:12:15 2013 +0400
@@ -286,12 +286,12 @@
             if mux.use_mux(request):
                 mux.start(request, self)
             else:
-        handler_suite = self.get_handler_suite(request.ws_resource)
-        if handler_suite is None:
+                handler_suite = self.get_handler_suite(request.ws_resource)
+                if handler_suite is None:
                     raise DispatchException('No handler for: %r' %
                                             request.ws_resource)
-        transfer_data_ = handler_suite.transfer_data
-            transfer_data_(request)
+                transfer_data_ = handler_suite.transfer_data
+                transfer_data_(request)
 
             if not request.server_terminated:
                 request.ws_stream.close_connection()
--- a/modules/web/src/main/native/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/extensions.py	Fri Jul 05 14:44:35 2013 +0400
+++ b/modules/web/src/main/native/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/extensions.py	Fri Jul 05 17:12:15 2013 +0400
@@ -67,7 +67,7 @@
             if response is None:
                 self._active = False
             return response
-            return None
+        return None
 
     def _setup_stream_options_internal(self, stream_options):
         pass
@@ -176,8 +176,8 @@
 
         window_bits = None
         if self._request.has_parameter(self._WINDOW_BITS_PARAM):
-        window_bits = self._request.get_parameter_value(
-            self._WINDOW_BITS_PARAM)
+            window_bits = self._request.get_parameter_value(
+                self._WINDOW_BITS_PARAM)
             try:
                 window_bits = _parse_window_bits(window_bits)
             except ValueError, e:
@@ -268,7 +268,7 @@
         if (not self._compress_outgoing or
             common.is_control_opcode(frame.opcode)):
             self._outgoing_average_ratio_calculator.add_result_bytes(
-                original_payload_size)
+                    original_payload_size)
             return
 
         frame.payload = self._rfc1979_deflater.filter(
@@ -296,7 +296,7 @@
 
         if frame.rsv1 != 1 or common.is_control_opcode(frame.opcode):
             self._incoming_average_ratio_calculator.add_original_bytes(
-                received_payload_size)
+                    received_payload_size)
             return
 
         frame.payload = self._rfc1979_inflater.filter(frame.payload)
--- a/modules/web/src/main/native/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/handshake/_base.py	Fri Jul 05 14:44:35 2013 +0400
+++ b/modules/web/src/main/native/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/handshake/_base.py	Fri Jul 05 17:12:15 2013 +0400
@@ -93,16 +93,16 @@
     if not subprotocol:
         raise HandshakeException('Invalid subprotocol name: empty')
 
-        # Parameter should be encoded HTTP token.
-        state = http_header_util.ParsingState(subprotocol)
-        token = http_header_util.consume_token(state)
-        rest = http_header_util.peek(state)
-        # If |rest| is not None, |subprotocol| is not one token or invalid. If
-        # |rest| is None, |token| must not be None because |subprotocol| is
-        # concatenation of |token| and |rest| and is not None.
-        if rest is not None:
-            raise HandshakeException('Invalid non-token string in subprotocol '
-                                     'name: %r' % rest)
+    # Parameter should be encoded HTTP token.
+    state = http_header_util.ParsingState(subprotocol)
+    token = http_header_util.consume_token(state)
+    rest = http_header_util.peek(state)
+    # If |rest| is not None, |subprotocol| is not one token or invalid. If
+    # |rest| is None, |token| must not be None because |subprotocol| is
+    # concatenation of |token| and |rest| and is not None.
+    if rest is not None:
+        raise HandshakeException('Invalid non-token string in subprotocol '
+                                 'name: %r' % rest)
 
 
 def parse_host_header(request):
--- a/modules/web/src/main/native/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/headerparserhandler.py	Fri Jul 05 14:44:35 2013 +0400
+++ b/modules/web/src/main/native/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/headerparserhandler.py	Fri Jul 05 17:12:15 2013 +0400
@@ -195,7 +195,7 @@
         if not _dispatcher.get_handler_suite(request.uri):
             request.log_error(
                 'mod_pywebsocket: No handler for resource: %r' % request.uri,
-                              apache.APLOG_INFO)
+                apache.APLOG_INFO)
             request.log_error(
                 'mod_pywebsocket: Fallback to Apache', apache.APLOG_INFO)
             return apache.DECLINED
--- a/modules/web/src/main/native/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/standalone.py	Fri Jul 05 14:44:35 2013 +0400
+++ b/modules/web/src/main/native/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/standalone.py	Fri Jul 05 17:12:15 2013 +0400
@@ -41,7 +41,7 @@
 
   $ python mod_pywebsocket/standalone.py [-p <ws_port>]
                                          [-w <websock_handlers>]
-                         [-d <document_root>]
+                                         [-d <document_root>]
 
 <ws_port> is the port number to use for ws:// connection.
 
@@ -287,7 +287,7 @@
     - convert SysCallError exceptions that its recv method may raise into a
       return value of '', meaning EOF. We cannot overwrite the recv method on
       self._connection since it's immutable.
-        """
+    """
 
     _OVERRIDDEN_ATTRIBUTES = ['_connection', 'makefile', 'shutdown', 'recv']
 
@@ -432,7 +432,7 @@
                         if server_options.tls_client_cert_optional:
                             client_cert_ = ssl.CERT_OPTIONAL
                         else:
-                        client_cert_ = ssl.CERT_REQUIRED
+                            client_cert_ = ssl.CERT_REQUIRED
                     else:
                         client_cert_ = ssl.CERT_NONE
                     socket_ = ssl.wrap_socket(socket_,
@@ -585,7 +585,7 @@
                 cert = accepted_socket.get_peer_certificate()
                 self._logger.debug('Client cert subject: %r',
                                    cert.get_subject().get_components())
-            accepted_socket = _StandaloneSSLConnection(accepted_socket)
+                accepted_socket = _StandaloneSSLConnection(accepted_socket)
             else:
                 raise ValueError('No TLS support module is available')
 
@@ -1073,7 +1073,7 @@
             else:
                 logging.critical(
                         'TLS support requires ssl or pyOpenSSL module.')
-            sys.exit(1)
+                sys.exit(1)
         elif options.tls_module == _TLS_BY_STANDARD_MODULE:
             if not _import_ssl():
                 logging.critical('ssl module is not available')
--- a/modules/web/src/main/native/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/util.py	Fri Jul 05 14:44:35 2013 +0400
+++ b/modules/web/src/main/native/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/util.py	Fri Jul 05 17:12:15 2013 +0400
@@ -343,7 +343,7 @@
         if flush:
             # Strip last 4 octets which is LEN and NLEN field of a
             # non-compressed block added for Z_SYNC_FLUSH.
-        return self._deflater.compress_and_flush(bytes)[:-4]
+            return self._deflater.compress_and_flush(bytes)[:-4]
         return self._deflater.compress(bytes)
 
 
--- a/modules/web/src/main/native/Tools/Scripts/webkitpy/tool/commands/download.py	Fri Jul 05 14:44:35 2013 +0400
+++ b/modules/web/src/main/native/Tools/Scripts/webkitpy/tool/commands/download.py	Fri Jul 05 17:12:15 2013 +0400
@@ -4,7 +4,7 @@
 # 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
@@ -14,7 +14,7 @@
 #     * Neither the name of Google Inc. nor the names of its
 # contributors may be used to endorse or promote products derived from
 # this software without specific prior written permission.
-# 
+#
 # 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/modules/web/src/main/native/Tools/Scripts/webkitpy/tool/commands/queues.py	Fri Jul 05 14:44:35 2013 +0400
+++ b/modules/web/src/main/native/Tools/Scripts/webkitpy/tool/commands/queues.py	Fri Jul 05 17:12:15 2013 +0400
@@ -4,7 +4,7 @@
 # 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
@@ -14,7 +14,7 @@
 #     * Neither the name of Google Inc. nor the names of its
 # contributors may be used to endorse or promote products derived from
 # this software without specific prior written permission.
-# 
+#
 # 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
@@ -214,15 +214,15 @@
         # it should return None.
         patch = None
         while not patch:
-        patch_id = self._tool.status_server.next_work_item(self.name)
-        if not patch_id:
-            return None
-        patch = self._tool.bugs.fetch_attachment(patch_id)
-        if not patch:
-            # FIXME: Using a fake patch because release_work_item has the wrong API.
-            # We also don't really need to release the lock (although that's fine),
-            # mostly we just need to remove this bogus patch from our queue.
-            # If for some reason bugzilla is just down, then it will be re-fed later.
+            patch_id = self._tool.status_server.next_work_item(self.name)
+            if not patch_id:
+                return None
+            patch = self._tool.bugs.fetch_attachment(patch_id)
+            if not patch:
+                # FIXME: Using a fake patch because release_work_item has the wrong API.
+                # We also don't really need to release the lock (although that's fine),
+                # mostly we just need to remove this bogus patch from our queue.
+                # If for some reason bugzilla is just down, then it will be re-fed later.
                 fake_patch = Attachment({'id': patch_id}, None)
                 self._release_work_item(fake_patch)
         return patch
--- a/modules/web/src/main/native/Tools/Scripts/webkitpy/tool/commands/rebaseline.py	Fri Jul 05 14:44:35 2013 +0400
+++ b/modules/web/src/main/native/Tools/Scripts/webkitpy/tool/commands/rebaseline.py	Fri Jul 05 17:12:15 2013 +0400
@@ -153,9 +153,9 @@
             lock = self._tool.make_file_lock(path + '.lock')
             lock.acquire_lock()
             expectations = TestExpectations(port, include_generic=False, include_overrides=False)
-        for test_configuration in port.all_test_configurations():
-            if test_configuration.version == port.test_configuration().version:
-                expectationsString = expectations.remove_configuration_from_test(test_name, test_configuration)
+            for test_configuration in port.all_test_configurations():
+                if test_configuration.version == port.test_configuration().version:
+                    expectationsString = expectations.remove_configuration_from_test(test_name, test_configuration)
 
             self._tool.filesystem.write_text_file(path, expectationsString)
         finally:
@@ -325,8 +325,8 @@
             for line in output:
                 try:
                     if line:
-                    files_to_add.update(json.loads(line)['add'])
-                    file_added = True
+                        files_to_add.update(json.loads(line)['add'])
+                        file_added = True
                 except ValueError:
                     _log.debug('"%s" is not a JSON object, ignoring' % line)
 
@@ -361,7 +361,7 @@
 
         files_to_add = self._files_to_add(command_results)
         if files_to_add:
-        self._tool.scm().add_list(list(files_to_add))
+            self._tool.scm().add_list(list(files_to_add))
 
         if options.optimize:
             self._optimize_baselines(test_list, options.verbose)
@@ -456,7 +456,7 @@
     def _builders_to_pull_from(self):
         webkit_buildbot_builder_names = []
         for name in builders.all_builder_names():
-                webkit_buildbot_builder_names.append(name)
+            webkit_buildbot_builder_names.append(name)
 
         titles = ["build.webkit.org bots"]
         lists = [webkit_buildbot_builder_names]
--- a/modules/web/src/main/native/Tools/Scripts/webkitpy/tool/commands/suggestnominations.py	Fri Jul 05 14:44:35 2013 +0400
+++ b/modules/web/src/main/native/Tools/Scripts/webkitpy/tool/commands/suggestnominations.py	Fri Jul 05 17:12:15 2013 +0400
@@ -171,35 +171,35 @@
         # See if we already have a contributor with this author_name or email
         counter_by_name = analysis['counters_by_name'].get(author_name)
         counter_by_email = analysis['counters_by_email'].get(author_email)
-            if counter_by_name:
-                if counter_by_email:
-                    if counter_by_name != counter_by_email:
-                        # Merge these two counters  This is for the case where we had
-                        # John Smith (jsmith@gmail.com) and Jonathan Smith (jsmith@apple.com)
-                        # and just found a John Smith (jsmith@apple.com).  Now we know the
-                        # two names are the same person
-                        counter_by_name['names'] |= counter_by_email['names']
-                        counter_by_name['emails'] |= counter_by_email['emails']
-                        counter_by_name['count'] += counter_by_email.get('count', 0)
+        if counter_by_name:
+            if counter_by_email:
+                if counter_by_name != counter_by_email:
+                    # Merge these two counters  This is for the case where we had
+                    # John Smith (jsmith@gmail.com) and Jonathan Smith (jsmith@apple.com)
+                    # and just found a John Smith (jsmith@apple.com).  Now we know the
+                    # two names are the same person
+                    counter_by_name['names'] |= counter_by_email['names']
+                    counter_by_name['emails'] |= counter_by_email['emails']
+                    counter_by_name['count'] += counter_by_email.get('count', 0)
                     analysis['counters_by_email'][author_email] = counter_by_name
-                else:
-                    # Add email to the existing counter
+            else:
+                # Add email to the existing counter
                 analysis['counters_by_email'][author_email] = counter_by_name
-                    counter_by_name['emails'] |= set([author_email])
+                counter_by_name['emails'] |= set([author_email])
+        else:
+            if counter_by_email:
+                # Add name to the existing counter
+                analysis['counters_by_name'][author_name] = counter_by_email
+                counter_by_email['names'] |= set([author_name])
             else:
-                if counter_by_email:
-                    # Add name to the existing counter
-                analysis['counters_by_name'][author_name] = counter_by_email
-                    counter_by_email['names'] |= set([author_name])
-                else:
-                    # Create new counter
-                    new_counter = {'names': set([author_name]), 'emails': set([author_email]), 'latest_name': author_name, 'latest_email': author_email, 'commits': ""}
+                # Create new counter
+                new_counter = {'names': set([author_name]), 'emails': set([author_email]), 'latest_name': author_name, 'latest_email': author_email, 'commits': ""}
                 analysis['counters_by_name'][author_name] = new_counter
                 analysis['counters_by_email'][author_email] = new_counter
 
         assert(analysis['counters_by_name'][author_name] == analysis['counters_by_email'][author_email])
         counter = analysis['counters_by_name'][author_name]
-            counter['count'] = counter.get('count', 0) + 1
+        counter['count'] = counter.get('count', 0) + 1
 
         if revision.isdigit():
             revision = "http://trac.webkit.org/changeset/" + revision
--- a/modules/web/src/main/native/Tools/Scripts/webkitpy/tool/multicommandtool.py	Fri Jul 05 14:44:35 2013 +0400
+++ b/modules/web/src/main/native/Tools/Scripts/webkitpy/tool/multicommandtool.py	Fri Jul 05 17:12:15 2013 +0400
@@ -113,12 +113,12 @@
     def check_arguments_and_execute(self, options, args, tool=None):
         if len(args) < len(self.required_arguments):
             _log.error("%s required, %s provided.  Provided: %s  Required: %s\nSee '%s help %s' for usage." % (
-                pluralize("argument", len(self.required_arguments)),
-                pluralize("argument", len(args)),
-                "'%s'" % " ".join(args),
-                " ".join(self.required_arguments),
-                tool.name(),
-                self.name))
+                       pluralize("argument", len(self.required_arguments)),
+                       pluralize("argument", len(args)),
+                       "'%s'" % " ".join(args),
+                       " ".join(self.required_arguments),
+                       tool.name(),
+                       self.name))
             return 1
         return self.execute(options, args, tool) or 0
 
--- a/modules/web/src/main/native/Tools/Scripts/webkitpy/tool/servers/reflectionhandler.py	Fri Jul 05 14:44:35 2013 +0400
+++ b/modules/web/src/main/native/Tools/Scripts/webkitpy/tool/servers/reflectionhandler.py	Fri Jul 05 17:12:15 2013 +0400
@@ -141,4 +141,4 @@
             self.end_headers()
 
             if not headers_only:
-            shutil.copyfileobj(static_file, self.wfile)
+                shutil.copyfileobj(static_file, self.wfile)
--- a/modules/web/src/main/native/Tools/Scripts/webkitpy/tool/steps/preparechangelog.py	Fri Jul 05 14:44:35 2013 +0400
+++ b/modules/web/src/main/native/Tools/Scripts/webkitpy/tool/steps/preparechangelog.py	Fri Jul 05 17:12:15 2013 +0400
@@ -105,7 +105,7 @@
         if self.cached_lookup(state, "changelogs"):
             self._ensure_bug_url(state)
             if not self._options.update_changelogs:
-            return
+                return
 
         args = self._tool.deprecated_port().prepare_changelog_command()
         if state.get("bug_id"):
--- a/modules/web/src/main/native/Tools/Scripts/webkitpy/tool/steps/runtests.py	Fri Jul 05 14:44:35 2013 +0400
+++ b/modules/web/src/main/native/Tools/Scripts/webkitpy/tool/steps/runtests.py	Fri Jul 05 17:12:15 2013 +0400
@@ -1,9 +1,9 @@
 # Copyright (C) 2010 Google 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
@@ -13,7 +13,7 @@
 #     * Neither the name of Google Inc. nor the names of its
 # contributors may be used to endorse or promote products derived from
 # this software without specific prior written permission.
-# 
+#
 # 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