Bug 187294 - check-webkit-style: Run the tool without SVN client.
Summary: check-webkit-style: Run the tool without SVN client.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Basuke Suzuki
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-07-03 09:41 PDT by Basuke Suzuki
Modified: 2018-07-03 13:46 PDT (History)
13 users (show)

See Also:


Attachments
PATCH (1.65 KB, patch)
2018-07-03 09:59 PDT, Basuke Suzuki
dbates: review+
dbates: commit-queue-
Details | Formatted Diff | Diff
Fix ChangeLog (2.14 KB, patch)
2018-07-03 13:04 PDT, Basuke Suzuki
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Basuke Suzuki 2018-07-03 09:41:50 PDT
It fails if SVN client is not installed. SVN is optional.
Comment 1 Basuke Suzuki 2018-07-03 09:59:37 PDT
Created attachment 344193 [details]
PATCH
Comment 2 Basuke Suzuki 2018-07-03 12:07:02 PDT
Without this patch, tools which uses the method SVN.in_working_directory() raises exception which terminates the command:

> $ python Tools/Scripts/check-webkit-style  --help
> Traceback (most recent call last):
>   File "Tools/Scripts/check-webkit-style", line 48, in <module>
>     sys.exit(CheckWebKitStyle().main())
>   File "C:\Users\basuke\webkit-trunk\Tools\Scripts\webkitpy\style\main.py", line 127, in main
>     host.initialize_scm()
>   File "C:\Users\basuke\webkit-trunk\Tools\Scripts\webkitpy\common\host.py", line 81, in initialize_scm
>     self._checkout = Checkout(detector.default_scm(patch_directories))
>   File "C:\Users\basuke\webkit-trunk\Tools\Scripts\webkitpy\common\checkout\scm\detection.py", line 55, in default_scm
>     scm_system = self.detect_scm_system(cwd, patch_directories)
>   File "C:\Users\basuke\webkit-trunk\Tools\Scripts\webkitpy\common\checkout\scm\detection.py", line 71, in detect_scm_system
>     if SVN.in_working_directory(real_path, executive=self._executive):
>   File "C:\Users\basuke\webkit-trunk\Tools\Scripts\webkitpy\common\checkout\scm\svn.py", line 101, in in_working_directory
>     exit_code = executive.run_command(svn_info_args, cwd=path, return_exit_code=True)
>   File "C:\Users\basuke\webkit-trunk\Tools\Scripts\webkitpy\common\system\executive.py", line 386, in run_command
>     close_fds=self._should_close_fds())
>   File "C:\Users\basuke\webkit-trunk\Tools\Scripts\webkitpy\common\system\executive.py", line 481, in popen
>     return subprocess.Popen(string_args, **kwargs)
>   File "C:\Python27\lib\subprocess.py", line 390, in __init__
>     errread, errwrite)
>   File "C:\Python27\lib\subprocess.py", line 640, in _execute_child
>     startupinfo)
> WindowsError: [Error 2] The system cannot find the file specified
Comment 3 Daniel Bates 2018-07-03 12:23:48 PDT
Comment on attachment 344193 [details]
PATCH

View in context: https://bugs.webkit.org/attachment.cgi?id=344193&action=review

> Tools/ChangeLog:6
> +        Follow the same strategy with git.py. If it invokes exception, it just returns False.

The description in the ChangeLog should come after the "Reviewed by" line.

The "strategy" you are referring to in git.py was added in <https://trac.webkit.org/changeset/92440/webkit> as  speculative fix for the "svn revision on Windows" problem. That is, it was not added to allow people to run check-webkit-style without a Git checkout. So, I would remove the first sentence of your ChangeLog as it does not justify this change. Please describe that Subversion is considered optional according to the wording on <https://webkit.org/getting-the-code/#checking-out-with-git> and <https://webkit.org/webkit-on-windows/#installing-developer-tools> and explain that this patch makes it so that people with only a Git checkout of WebKit that commit using the commit-queue (or another machine with an SVN checkout) can run check-webkit-style.
Comment 4 Basuke Suzuki 2018-07-03 12:30:09 PDT
Right. Thanks.
Comment 5 Basuke Suzuki 2018-07-03 13:04:20 PDT
Created attachment 344206 [details]
Fix ChangeLog

Thanks for r+, Daniel.
Comment 6 WebKit Commit Bot 2018-07-03 13:45:06 PDT
Comment on attachment 344206 [details]
Fix ChangeLog

Clearing flags on attachment: 344206

Committed r233474: <https://trac.webkit.org/changeset/233474>
Comment 7 WebKit Commit Bot 2018-07-03 13:45:08 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2018-07-03 13:46:55 PDT
<rdar://problem/41790081>