Esempio n. 1
0
 def testCloneModifyPushToBranch(self):
     new_repo = clone(self.repo, utils.get_temporary_location())
     branch = new_repo.createBranch('work')
     new_repo.checkout(branch)
     utils.commit_change(new_repo)
     new_repo.push(self.repo, fromBranch=branch, toBranch='work')
     self.assertTrue(self.repo.getBranchByName('work').getHead() == new_repo.getHead())
Esempio n. 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)
Esempio n. 3
0
 def testCloneModifyPushToBranch(self):
     new_repo = clone(self.repo, utils.get_temporary_location())
     prev_branch = self.repo.getCurrentBranch()
     self.repo.checkout(self.repo.createBranch('temp'))
     branch = new_repo.createBranch('work')
     new_repo.checkout(branch)
     utils.commit_change(new_repo)
     new_repo.push(self.repo, fromBranch=branch, toBranch='work')
     self.repo.checkout(prev_branch)
     self.assertTrue(self.repo.getBranchByName('work').getHead() == new_repo.getHead())
Esempio n. 4
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)