Bug 183762 - 'webkit-patch setup-git-clone' fails when SVN is not installed
Summary: 'webkit-patch setup-git-clone' fails when SVN is not installed
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-19 20:11 PDT by Michael Catanzaro
Modified: 2018-08-10 10:58 PDT (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 2018-03-19 20:11:15 PDT
'webkit-patch setup-git-clone' fails when SVN is not installed. There is already protection for the case where git is not installed, so we can just copy that.
Comment 1 Michael Catanzaro 2018-03-19 20:13:23 PDT
(In reply to Michael Catanzaro from comment #0)
> 'webkit-patch setup-git-clone' fails when SVN is not installed. There is
> already protection for the case where git is not installed, so we can just
> copy that.

Well not really; I should test things before reporting bugs. The script really needs git, svn, and also git-svn in order to work.
Comment 2 Michael Catanzaro 2018-03-20 09:32:28 PDT
Problem is here, in svn.py:

    @classmethod
    def in_working_directory(cls, path, executive=None):
        if os.path.isdir(os.path.join(path, '.svn')):
            # This is a fast shortcut for svn info that is usually correct for SVN < 1.7,
            # but doesn't work for SVN >= 1.7.
            return True

        executive = executive or Executive()
        svn_info_args = [cls.executable_name, 'info']
        exit_code = executive.run_command(svn_info_args, cwd=path, return_exit_code=True)
        return (exit_code == 0)

The call to executive.run_command() throws an OSError, and the user gets a nasty traceback. Probably needs to caught and changed to return false, which is what git.py does. Then, at a higher level, provide a sane error message.
Comment 3 Carlos Alberto Lopez Perez 2018-03-20 11:38:17 PDT
(In reply to Michael Catanzaro from comment #0)
> 'webkit-patch setup-git-clone' fails when SVN is not installed. There is
> already protection for the case where git is not installed, so we can just
> copy that.

svn should be installed by the script install-dependencies. So Its assumed its available
Comment 4 Michael Catanzaro 2018-03-20 18:49:18 PDT
First thing I did after cloning WebKit was 'webkit-patch setup-git-clone'.
Comment 5 Carlos Alberto Lopez Perez 2018-03-21 03:27:03 PDT
(In reply to Michael Catanzaro from comment #4)
> First thing I did after cloning WebKit was 'webkit-patch setup-git-clone'.

The WebKit repository uses SVN, so I can argue it is somehow obvious that you will need the SVN tool to interact with the SVN repository.

But in case you think it is not, then I suggest to request some change on the documentation to make this clearer.

Or even better: the tool 'webkit-patch setup-git-clone' can be modified to fail early if it can't find the svn binary telling a meaningful error about the issue: that you need svn installed.
Comment 6 Ryosuke Niwa 2018-08-10 10:58:59 PDT
I think we can make setup-git-clone work without svn. People who don't commit directly don't really need git-svn setup although I'd imagine any serious committers would have set it up anyway.