code: def set(self, repo):
          
          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
docs: Sets the given repository (by name).