def test_gitflow_publish_creates_sets_tracking_branch(self): gitflow = GitFlow(self.repo).init() gitflow.create('feature', 'circular', 'devel', fetch=False) gitflow.publish('feature', 'circular') self.assertTrue(self.repo.branches['feat/circular'].tracking_branch()) self.assertTrue(self.repo.branches['feat/circular'].tracking_branch().name, 'my-remote/feat/circular')
def test_gitflow_publish_creates_sets_tracking_branch(self): gitflow = GitFlow(self.repo).init() gitflow.create('feature', 'circular', 'devel', fetch=False) gitflow.publish('feature', 'circular') self.assertTrue(self.repo.branches['feat/circular'].tracking_branch()) self.assertTrue( self.repo.branches['feat/circular'].tracking_branch().name, 'my-remote/feat/circular')
def test_gitflow_publish_really_pushes(self): gitflow = GitFlow(self.repo).init() gitflow.create('feature', 'circular', 'devel', fetch=False) change = fake_commit(self.repo, "Another commit") all_local_commits = all_commits(self.repo) self.assertIn(change, all_local_commits) gitflow.publish('feature', 'circular') all_remote_commits = all_commits(self.remote) self.assertEqual(all_remote_commits, all_remote_commits) self.assertIn(change, all_remote_commits)
def run_publish(args): gitflow = GitFlow() version = gitflow.name_or_current('hotfix', args.version) gitflow.start_transaction('publishing hotfix branch %s' % version) branch = gitflow.publish('hotfix', version) print() print("Summary of actions:") print("- A new remote branch '%s' was created" % branch) print("- The local branch '%s' was configured to track the remote branch" % branch) print("- You are now on branch '%s'" % branch) print()
def run_publish(args): gitflow = GitFlow() version = gitflow.name_or_current('hotfix', args.version) gitflow.start_transaction('publishing hotfix branch %s' % version) branch = gitflow.publish('hotfix', version) print print "Summary of actions:" print "- A new remote branch '%s' was created" % branch print "- The local branch '%s' was configured to track the remote branch" % branch print "- You are now on branch '%s'" % branch print
def run_publish(args): gitflow = GitFlow() name = gitflow.nameprefix_or_current('feature', args.nameprefix) gitflow.start_transaction('publishing feature branch %s' % name) branch = gitflow.publish('feature', name) print() print("Summary of actions:") print("- A new remote branch '%s' was created" % branch) print("- The local branch '%s' was configured to track the remote branch" % branch) print("- You are now on branch '%s'" % branch) print()
def run_publish(args): gitflow = GitFlow() name = gitflow.nameprefix_or_current('feature', args.nameprefix) gitflow.start_transaction('publishing feature branch %s' % name) branch = gitflow.publish('feature', name) print print "Summary of actions:" print "- A new remote branch '%s' was created" % branch print "- The local branch '%s' was configured to track the remote branch" % branch print "- You are now on branch '%s'" % branch print
def run_publish(args): gitflow = GitFlow() git = gitflow.git name = gitflow.nameprefix_or_current('feature', args.nameprefix) gitflow.start_transaction('publishing feature branch %s' % name) branch = gitflow.publish('feature', name) print(branch) base_marker = gitflow.managers['feature'].base_marker_name(str(branch)) git.push(gitflow.origin_name(), base_marker) print print "Summary of actions:" print "- A new remote branch '%s' was created" % branch print "- The local branch '%s' was configured to track the remote branch" % branch print "- You are now on branch '%s'" % branch print
def test_gitflow_publish_creates_remote_branch(self): gitflow = GitFlow(self.repo).init() gitflow.create('feature', 'circular', 'devel', fetch=False) gitflow.publish('feature', 'circular') self.assertIn('feat/circular', self.remote.branches)
def test_gitflow_publish_returns_branch_name(self): gitflow = GitFlow(self.repo).init() gitflow.create('feature', 'circular', 'devel', fetch=False) name = gitflow.publish('feature', 'circular') self.assertEqual(name, 'feat/circular')