def get_file_exists(self, repository, path, revision, base_commit_id,
                        *args, **kwargs):
        """Check whether a file exists in ReviewBoardGateway.

        This will perform an API request to fetch the meta_data of a file.
        """
        url = self._get_file_url(repository, revision, base_commit_id, path)

        try:
            self._api_head(url)
            return True
        except (__HOLE__, 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))
dataset/ETHPy150Open reviewboard/reviewboard/reviewboard/hostingsvcs/rbgateway.py/ReviewBoardGateway.get_file_exists