Sets the given repository (by name).

def set(self, repo):
        """
        Sets the given repository (by name).
        """
        name = repo.name
        if name in self.__repositories \
           and self.__repositories[name].is_initialized:
            raise ValueError('Can not replace repositories that have been '
                             'initialized.')
        self.__repositories[name] = repo