コード例 #1
0
 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
コード例 #2
0
ファイル: repository.py プロジェクト: marclaporte/subuser
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()
コード例 #3
0
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()
コード例 #4
0
ファイル: repositories.py プロジェクト: marclaporte/subuser
 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
コード例 #5
0
ファイル: repositories.py プロジェクト: peter1000/subuser
 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