Creates a new repository of the given type. If the root repository
        domain (see :class:`everest.repositories.constants.REPOSITORY_DOMAINS`)
        is passed as a repository name, the type string is used as the name;
        if no name is passed, a unique name is created automatically.

def new(self, repo_type, name=None, make_default=False,
            repository_class=None, aggregate_class=None,
            configuration=None):
        """
        Creates a new repository of the given type. If the root repository
        domain (see :class:`everest.repositories.constants.REPOSITORY_DOMAINS`)
        is passed as a repository name, the type string is used as the name;
        if no name is passed, a unique name is created automatically.
        """
        if name == REPOSITORY_DOMAINS.ROOT:
            # Unless explicitly configured differently, all root repositories
            # join the transaction.
            join_transaction = True
            autocommit = False
            name = repo_type
        else:
            join_transaction = False
            if name is None:
                name = "%s%d" % (repo_type, next(self.__repo_id_gen))
            # The system repository is special in that its repository
            # should not join the transaction but still commit all changes.
            autocommit = name == REPOSITORY_DOMAINS.SYSTEM
        if repository_class is None:
            reg = get_current_registry()
            repository_class = reg.queryUtility(IRepository, name=repo_type)
            if repository_class is None:
                raise ValueError('Unknown repository type "%s".' % repo_type)
        repo = repository_class(name,
                                aggregate_class,
                                join_transaction=join_transaction,
                                autocommit=autocommit)
        if not configuration is None:
            repo.configure(**configuration)
        if make_default:
            self.__default_repo = repo
        return repo