Exemple #1
0
def repository(client):
    name = _utils.generate_default_name()
    repo = client.get_or_create_repository(name)

    yield repo

    utils.delete_repository(repo.id, client._conn)
Exemple #2
0
 def testCloneModifyPush(self):
     new_repo = LocalRepository(utils.get_temporary_location())
     new_repo.clone(self.repo)
     self.assertReposEqual(self.repo, new_repo)
     utils.commit_change(new_repo)
     new_repo.push()
     self.repo.resetHard()
     self.assertReposEqual(self.repo, new_repo)        
     utils.delete_repository(new_repo)
Exemple #3
0
 def testCloneModifyPush(self):
     new_repo = LocalRepository(utils.get_temporary_location())        
     new_repo.clone(self.repo)
     #checkout a different branch to comply with git 1.7.0
     prev_branch = self.repo.getCurrentBranch()
     self.repo.checkout(self.repo.createBranch('temp'))        
     self.assertReposEqual(self.repo, new_repo)
     utils.commit_change(new_repo)
     new_repo.push()
     self.repo.checkout(prev_branch)        
     self.assertReposEqual(self.repo, new_repo)        
     utils.delete_repository(new_repo)
Exemple #4
0
 def tearDown(self):
     utils.delete_repository(self.repo)
Exemple #5
0
 def tearDown(self):
     if os.path.exists(self.dirname):
         delete_repository(self.repo)
Exemple #6
0
 def tearDown(self):
     if os.path.exists(self.dirname):
         delete_repository(self.repo)