def _get_all_revisions(self):
        # we must check if this repo is not empty, since later command
        # fails if it is. And it's cheaper to ask than throw the subprocess
        # errors
        try:
            self._repo.head()
        except KeyError:
            return []

        rev_filter = settings.GIT_REV_FILTER
        cmd = 'rev-list %s --reverse --date-order' % (rev_filter)
        try:
            so, se = self.run_git_command(cmd)
        except RepositoryError:
            # Can be raised for empty repositories
            return []
        return so.splitlines()
dataset/ETHPy150Open codeinn/vcs/vcs/backends/git/repository.py/GitRepository._get_all_revisions/original