def get_file_exists(self, repository, path, revision, base_commit_id,
                        *args, **kwargs):
        url = self._get_file_url(repository, revision, base_commit_id, path)

        try:
            self._api_head(url)
            return True
        except (HTTPError, URLError) as e:
            if e.code == 404:
                return False
            else:
                logging.warning('Failed to get file exists from %s: %s',
                                url, e, exc_info=1)
                raise SCMError(six.text_type(e))
Check whether a file exists in ReviewBoardGateway.
dataset/ETHPy150Open reviewboard/reviewboard/reviewboard/hostingsvcs/rbgateway.py/ReviewBoardGateway.get_file_exists