Ejemplo n.º 1
0
 def test_gitflow_pull_really_pulls(self):
     gitflow = GitFlow(self.repo).init()
     self.remote.heads['feat/even'].checkout()
     change = fake_commit(self.remote, "Another commit")
     self.assertNotIn(change, all_commits(self.repo))
     gitflow.pull('feature', 'my-remote', 'even')
     self.assertIn(change, all_commits(self.repo))
Ejemplo n.º 2
0
 def test_gitflow_pull_really_pulls(self):
     gitflow = GitFlow(self.repo).init()
     self.remote.heads['feat/even'].checkout()
     change = fake_commit(self.remote, "Another commit")
     self.assertNotIn(change, all_commits(self.repo))
     gitflow.pull('feature', 'my-remote', 'even')
     self.assertIn(change, all_commits(self.repo))
Ejemplo n.º 3
0
 def test_gitflow_pull_existing_branch_creates_non_tracking_branch(self):
     gitflow = GitFlow(self.repo).init()
     # create local branch based on first commit
     new_branch = self.repo.create_head('feat/even', 'stable')
     new_branch.checkout()
     gitflow.pull('feature', 'my-remote', 'even')
     self.assertEqual(self.repo.active_branch.name, 'feat/even')
     self.assertEqual(self.repo.active_branch.tracking_branch(), None)
Ejemplo n.º 4
0
 def test_gitflow_pull_existing_branch_creates_non_tracking_branch(self):
     gitflow = GitFlow(self.repo).init()
     # create local branch based on first commit
     new_branch = self.repo.create_head('feat/even', 'stable')
     new_branch.checkout()
     gitflow.pull('feature', 'my-remote', 'even')
     self.assertEqual(self.repo.active_branch.name, 'feat/even')
     self.assertEqual(self.repo.active_branch.tracking_branch(), None)
Ejemplo n.º 5
0
 def test_gitflow_pull_while_on_other_branchtype_is_allowed(self):
     gitflow = GitFlow(self.repo).init()
     # activate some hotfix branch
     new_branch = self.repo.create_head('hf-dummy', 'stable')
     new_branch.checkout()
     gitflow.pull('feature', 'my-remote', 'even')
Ejemplo n.º 6
0
 def test_gitflow_pull_creates_non_tracking_branch(self):
     gitflow = GitFlow(self.repo).init()
     gitflow.pull('feature', 'my-remote', 'even')
     self.assertEqual(self.repo.active_branch.name, 'feat/even')
     self.assertEqual(self.repo.active_branch.tracking_branch(), None)
Ejemplo n.º 7
0
 def test_gitflow_pull_while_on_other_branchtype_is_allowed(self):
     gitflow = GitFlow(self.repo).init()
     # activate some hotfix branch
     new_branch = self.repo.create_head('hf-dummy', 'stable')
     new_branch.checkout()
     gitflow.pull('feature', 'my-remote', 'even')
Ejemplo n.º 8
0
 def test_gitflow_pull_creates_non_tracking_branch(self):
     gitflow = GitFlow(self.repo).init()
     gitflow.pull('feature', 'my-remote', 'even')
     self.assertEqual(self.repo.active_branch.name, 'feat/even')
     self.assertEqual(self.repo.active_branch.tracking_branch(), None)
Ejemplo n.º 9
0
 def run_pull(args):
     gitflow = GitFlow()
     name = gitflow.name_or_current('feature', args.name, must_exist=False)
     gitflow.start_transaction('pulling remote feature branch %s '
                               'into local banch %s' % (args.remote, name))
     gitflow.pull('feature', args.remote, name)
Ejemplo n.º 10
0
 def run_pull(args):
     gitflow = GitFlow()
     name = gitflow.name_or_current('feature', args.name, must_exist=False)
     gitflow.start_transaction('pulling remote feature branch %s '
                               'into local banch %s' % (args.remote, name))
     gitflow.pull('feature', args.remote, name)