def _get_file_url(self, repository, revision, base_commit_id=None,
                      path=None):
        if revision:
            return ('%s/repos/%s/file/%s'
                    % (self.account.hosting_url,
                       repository.extra_data['rbgateway_repo_name'],
                       revision))
        else:
            return ('%s/repos/%s/commits/%s/path/%s'
                    % (self.account.hosting_url,
                       repository.extra_data['rbgateway_repo_name'],
                       base_commit_id,
                       path))
Get the URL for accessing the contents of a file.
dataset/ETHPy150Open reviewboard/reviewboard/reviewboard/hostingsvcs/rbgateway.py/ReviewBoardGateway._get_file_url