def _get_revision(self, revision):

        if self._empty:
            raise EmptyRepositoryError("There are no changesets yet")

        if revision in [-1, 'tip', None]:
            revision = 'tip'

        try:
            revision = hex(self._repo.lookup(revision))
        except (IndexError, ValueError, RepoLookupError, TypeError):
            raise ChangesetDoesNotExistError("Revision %s does not "
                                    "exist for this repository"
                                    % (revision))
        return revision
Signal the end of DB operations.
dataset/ETHPy150Open codeinn/vcs/vcs/backends/hg/repository.py/MercurialRepository._get_revision--crossover with--dataset/ETHPy150Open MapQuest/mapquest-osm-server/src/python/dbmgr/dbm_ops.py/DBOps.finish