def repository(client): name = _utils.generate_default_name() repo = client.get_or_create_repository(name) yield repo utils.delete_repository(repo.id, client._conn)
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)
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)
def tearDown(self): utils.delete_repository(self.repo)
def tearDown(self): if os.path.exists(self.dirname): delete_repository(self.repo)