当前位置: 首页>>代码示例>>Python>>正文


Python branches.ReleaseBranchManager类代码示例

本文整理汇总了Python中gitflow.branches.ReleaseBranchManager的典型用法代码示例。如果您正苦于以下问题:Python ReleaseBranchManager类的具体用法?Python ReleaseBranchManager怎么用?Python ReleaseBranchManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了ReleaseBranchManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_finish_release_keep

 def test_finish_release_keep(self):
     gitflow = GitFlow(self.repo)
     mgr = ReleaseBranchManager(gitflow)
     mgr.finish('1.0', keep=True)
     # release branch still exists
     self.assertIn('rel/1.0',
             [b.name for b in self.repo.branches])
开发者ID:opicacek,项目名称:gitflow,代码行数:7,代码来源:test_branches.py

示例2: test_delete_current_release_raises_error

 def test_delete_current_release_raises_error(self):
     gitflow = GitFlow(self.repo)
     mgr = ReleaseBranchManager(gitflow)
     mgr.create('1.0').checkout()
     self.assertRaisesRegexp(GitCommandError,
             'Cannot delete the branch .* which you are currently on',
             mgr.delete, '1.0')
开发者ID:opicacek,项目名称:gitflow,代码行数:7,代码来源:test_branches.py

示例3: test_release_branch_origin

 def test_release_branch_origin(self):
     repo = create_git_repo(self)
     gitflow = GitFlow(repo).init()
     mgr = ReleaseBranchManager(gitflow)
     new_branch = mgr.create('1.1')
     self.assertEqual(new_branch.commit,
             gitflow.repo.branches['develop'].commit)
开发者ID:opicacek,项目名称:gitflow,代码行数:7,代码来源:test_branches.py

示例4: test_finish_release_rebase

 def test_finish_release_rebase(self):
     repo = create_git_repo(self)
     gitflow = GitFlow(repo).init()
     mgr = ReleaseBranchManager(gitflow)
     mgr.create('1.0')
     self.assertRaisesRegexp(
         AssertionError, "does not make any sense",
         mgr.finish, '1.0', rebase=True)
开发者ID:opicacek,项目名称:gitflow,代码行数:8,代码来源:test_branches.py

示例5: test_create_new_release_branch_non_default_prefix

 def test_create_new_release_branch_non_default_prefix(self):
     gitflow = GitFlow(self.repo).init()
     mgr = ReleaseBranchManager(gitflow)
     new_branch = mgr.create('3.14-beta5')
     self.assertEqual(new_branch.name, 'rel/3.14-beta5')
     self.assertIn('rel/3.14-beta5', [b.name for b in mgr.list()])
     self.assertEqual(new_branch.commit,
             gitflow.repo.branches['devel'].commit)
开发者ID:opicacek,项目名称:gitflow,代码行数:8,代码来源:test_branches.py

示例6: test_create_release_changes_active_branch

    def test_create_release_changes_active_branch(self):
        repo = create_git_repo(self)
        gitflow = GitFlow(repo).init()
        mgr = ReleaseBranchManager(gitflow)

        self.assertEquals('develop', repo.active_branch.name)
        mgr.create('1.0')
        self.assertEquals('release/1.0', repo.active_branch.name)
开发者ID:opicacek,项目名称:gitflow,代码行数:8,代码来源:test_branches.py

示例7: test_create_new_release_from_alt_base

    def test_create_new_release_from_alt_base(self):
        gitflow = GitFlow(self.repo)
        mgr = ReleaseBranchManager(gitflow)

        new_branch = mgr.create('1.0',
                'c8b6deac7ef94f078a426d52c0b1fb3e1221133c')  # devel~1
        self.assertEqual(new_branch.commit.hexsha,
                'c8b6deac7ef94f078a426d52c0b1fb3e1221133c')
开发者ID:opicacek,项目名称:gitflow,代码行数:8,代码来源:test_branches.py

示例8: test_finish_release_rebase

 def test_finish_release_rebase(self):
     repo = create_git_repo(self)
     gitflow = GitFlow(repo).init()
     mgr = ReleaseBranchManager(gitflow)
     mgr.create('1.0')
     self.assertRaises(
         Exception,
         mgr.finish, '1.0', rebase=True)
开发者ID:chassing,项目名称:gitflow,代码行数:8,代码来源:test_branches.py

示例9: test_create_new_release_branch

 def test_create_new_release_branch(self):
     repo = create_git_repo(self)
     gitflow = GitFlow(repo).init()
     mgr = ReleaseBranchManager(gitflow)
     self.assertEqual(0, len(mgr.list()))
     new_branch = mgr.create('3.14-beta5')
     self.assertEqual(1, len(mgr.list()))
     self.assertEqual('release/3.14-beta5', mgr.list()[0].name)
     self.assertEqual(new_branch.commit,
             gitflow.repo.branches['develop'].commit)
开发者ID:opicacek,项目名称:gitflow,代码行数:10,代码来源:test_branches.py

示例10: test_finish_release_tag_sign

 def test_finish_release_tag_sign(self):
     gitflow = GitFlow(self.repo)
     mgr = ReleaseBranchManager(gitflow)
     taginfo = dict(
         message = 'Tagging version 1.0',
         signingkey = 'Dummy Key for Gitflow testing',
         )
     mgr.finish('1.0', tagging_info=taginfo)
     # tag message
     tag = self.repo.tags['v1.0'].tag
     self.assertIn('-----BEGIN PGP SIGNATURE-----', tag.message)
开发者ID:opicacek,项目名称:gitflow,代码行数:11,代码来源:test_branches.py

示例11: test_create_release_from_remote_branch

 def test_create_release_from_remote_branch(self):
     remote_branch = self.remote.refs['rel/1.0']
     rfc0 = remote_branch.commit
     gitflow = GitFlow(self.repo).init()
     mgr = ReleaseBranchManager(gitflow)
     mgr.create('1.0')
     branch = self.repo.active_branch
     self.assertEqual(branch.name, 'rel/1.0')
     self.assertEqual(branch.commit, rfc0)
     # must be a tracking branch
     self.assertTrue(branch.tracking_branch())
     self.assertEqual(branch.tracking_branch().name, 'my-remote/rel/1.0')
开发者ID:opicacek,项目名称:gitflow,代码行数:12,代码来源:test_branches.py

示例12: test_delete_release_with_commits_raises_error

    def test_delete_release_with_commits_raises_error(self):
        gitflow = GitFlow(self.repo)
        mgr = ReleaseBranchManager(gitflow)

        self.assertEquals(0, len(mgr.list()))
        mgr.create('0.7')
        fake_commit(self.repo, 'A commit on the release branch.', append=False)
        gitflow.develop().checkout()
        self.assertEquals(1, len(mgr.list()))
        self.assertRaisesRegexp(GitCommandError,
                'The branch .* is not fully merged',
                mgr.delete, '0.7')
开发者ID:opicacek,项目名称:gitflow,代码行数:12,代码来源:test_branches.py

示例13: test_create_release_changes_active_branch_even_if_dirty_but_without_conflicts

    def test_create_release_changes_active_branch_even_if_dirty_but_without_conflicts(self):
        gitflow = GitFlow(self.repo)
        mgr = ReleaseBranchManager(gitflow)

        # In this fixture, odd.py contains changes that would be overwritten.
        # Since we don't want to test this here, we revert all local changes in
        # odd.py, but leave the local changes in README.txt.  These changes
        # won't be overwritten by the merge, so git-flow should be able to
        # create a new release branch if Git can do this
        self.repo.index.reset(index=True, working_tree=True, paths=['odd.py'])
        mgr.create('1.0')
        self.assertIn('release/1.0', [b.name for b in mgr.iter()])
开发者ID:opicacek,项目名称:gitflow,代码行数:12,代码来源:test_branches.py

示例14: test_create_release_fetch_from_remote_branch_behind_really_fetches

    def test_create_release_fetch_from_remote_branch_behind_really_fetches(self):
        rfc0 = self.remote.refs['rel/1.0'].commit
        # add a commit to remote rel/1.0 branch
        self.remote.refs['rel/1.0'].checkout()
        change = fake_commit(self.remote, "Yet another 1.0 commit.")

        gitflow = GitFlow(self.repo).init()
        mgr = ReleaseBranchManager(gitflow)
        mgr.create('1.0', fetch=True)
        # must not advance rel/1.0
        self.assertEqual(self.repo.refs['rel/1.0'].commit, rfc0)
        # change must nor be in local repo
        self.assertNotIn(change, all_commits(self.repo))
开发者ID:opicacek,项目名称:gitflow,代码行数:13,代码来源:test_branches.py

示例15: test_finish_release_push_keep

    def test_finish_release_push_keep(self):
        # Since remote is no bare repo, checkout some branch untouched
        # by this operation. :fixme: find better solution
        self.remote.heads['feat/even'].checkout()
        gitflow = GitFlow(self.repo).init()
        mgr = ReleaseBranchManager(gitflow)
        mgr.create('1.0')
        mgr.finish('1.0', push=True, keep=True)

        # release branch still exists local and remote
        self.assertIn('rel/1.0',
                [b.name for b in self.repo.branches])
        self.assertIn('rel/1.0',
                [b.name for b in self.remote.branches])
开发者ID:opicacek,项目名称:gitflow,代码行数:14,代码来源:test_branches.py


注:本文中的gitflow.branches.ReleaseBranchManager类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。