def addRepository(self, repository): if not repository.isTemporary(): self.getUser().getRegistry().logChange("Adding new repository " + repository.getName()) else: self.getUser().getRegistry().logChange( "Adding new temporary repository " + repository.getGitOriginURI()) self.userRepositories[repository.getName()] = repository
def add(user,name,url): repository = subuserlib.resolve.lookupRepositoryByURI(user,url) if repository: if type(repository.getName()) is int: sys.exit("A temporary repository with this url already exists. Cannot add. The ability to uprade temporary repositories to named repositories is a wanted feature. Feal free to send a quality, well thought out, pull request.") else: sys.exit("The repository named:" +repository.getName()+" already has this URL. Cannot add.") else: repository = subuserlib.classes.repository.Repository(user,name=name,gitOriginURI=url,gitCommitHash="master") user.getRegistry().getRepositories().addRepository(repository) user.getRegistry().commit()
def add(user, name, url): repository = subuserlib.resolve.lookupRepositoryByURI(user, url) if repository: if type(repository.getName()) is int: sys.exit( "A temporary repository with this url already exists. Cannot add. The ability to uprade temporary repositories to named repositories is a wanted feature. Feal free to send a quality, well thought out, pull request." ) else: sys.exit("The repository named:" + repository.getName() + " already has this URL. Cannot add.") else: repository = subuserlib.classes.repository.Repository( user, name=name, gitOriginURI=url, gitCommitHash="master") user.getRegistry().getRepositories().addRepository(repository) user.getRegistry().commit()
def addRepository(self,repository): if not type(repository.getName()) is int: self.getUser().getRegistry().logChange("Adding new repository "+repository.getName()) else: self.getUser().getRegistry().logChange("Adding new temporary repository "+repository.getGitOriginURI()) self.userRepositories[repository.getName()] = repository
def addRepository(self,repository): if not repository.isTemporary(): self.getUser().getRegistry().logChange("Adding new repository "+repository.getDisplayName()) else: self.getUser().getRegistry().logChange("Adding new temporary repository "+repository.getDisplayName()) self.userRepositories[repository.getName()] = repository