Пример #1
0
    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')
Пример #2
0
    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')
Пример #3
0
    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)
Пример #4
0
    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)
Пример #5
0
 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()
Пример #6
0
 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
Пример #7
0
 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()
Пример #8
0
 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
Пример #9
0
 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
Пример #10
0
 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
Пример #11
0
 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)
Пример #12
0
 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)
Пример #13
0
 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')
Пример #14
0
 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')