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


Python FeatureBranchManager.merge方法代码示例

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


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

示例1: test_merge_conflict

# 需要导入模块: from gitflow.branches import FeatureBranchManager [as 别名]
# 或者: from gitflow.branches.FeatureBranchManager import merge [as 别名]
 def test_merge_conflict(self):
     gitflow = GitFlow(self.repo)
     mgr = FeatureBranchManager(gitflow)
     mgr.merge('recursion', 'devel')
     self.assertRaises(MergeError,
                       mgr.merge, 'even', 'devel')
     gitflow.git.rm('odd.py')
     gitflow.git.commit('-F.git/MERGE_MSG')
开发者ID:opicacek,项目名称:gitflow,代码行数:10,代码来源:test_branches.py

示例2: test_merge_feature_without_commits

# 需要导入模块: from gitflow.branches import FeatureBranchManager [as 别名]
# 或者: from gitflow.branches.FeatureBranchManager import merge [as 别名]
    def test_merge_feature_without_commits(self):
        repo = create_git_repo(self)
        gitflow = GitFlow(repo).init()
        mgr = FeatureBranchManager(gitflow)

        dc0 = gitflow.develop().commit
        mgr.create('newstuff')
        mgr.merge('newstuff', 'develop')
        dc1 = gitflow.develop().commit

        # Assert the develop tip is unchanged by the merge
        self.assertEqual(dc0, dc1)
        # Assert the target-branch is active
        self.assertEqual(gitflow.repo.active_branch.name, 'develop')
开发者ID:opicacek,项目名称:gitflow,代码行数:16,代码来源:test_branches.py

示例3: test_delete_already_merged_feature

# 需要导入模块: from gitflow.branches import FeatureBranchManager [as 别名]
# 或者: from gitflow.branches.FeatureBranchManager import merge [as 别名]
    def test_delete_already_merged_feature(self):
        gitflow = GitFlow(self.repo)
        mgr = FeatureBranchManager(gitflow)

        self.assertEquals(2, len(mgr.list()))
        mgr.create('foo')
        fake_commit(self.repo, 'Dummy commit #1')
        fake_commit(self.repo, 'Dummy commit #2')
        mgr.merge('foo', 'devel')

        self.assertEquals(3, len(mgr.list()))
        mgr.delete('foo')
        self.assertEquals(2, len(mgr.list()))
        self.assertNotIn('feat/foo', [b.name for b in mgr.list()])
开发者ID:opicacek,项目名称:gitflow,代码行数:16,代码来源:test_branches.py

示例4: test_merge_feature_with_multiple_commits

# 需要导入模块: from gitflow.branches import FeatureBranchManager [as 别名]
# 或者: from gitflow.branches.FeatureBranchManager import merge [as 别名]
    def test_merge_feature_with_multiple_commits(self):
        gitflow = GitFlow(self.repo)
        mgr = FeatureBranchManager(gitflow)

        dc0 = gitflow.develop().commit
        mgr.merge('even', 'devel')
        dc1 = gitflow.develop().commit

        # Assert merge commit has been made
        self.assertEqual(2, len(dc1.parents))
        self.assertTrue(dc1.message.startswith("Merge branch 'feat/even' into devel\n"))

        # Assert develop branch advanced
        self.assertNotEqual(dc0, dc1)
        # Assert the target-branch is active
        self.assertEqual(gitflow.repo.active_branch.name, 'devel')
开发者ID:chassing,项目名称:gitflow,代码行数:18,代码来源:test_branches.py

示例5: test_merge_feature_with_single_commit

# 需要导入模块: from gitflow.branches import FeatureBranchManager [as 别名]
# 或者: from gitflow.branches.FeatureBranchManager import merge [as 别名]
    def test_merge_feature_with_single_commit(self):
        gitflow = GitFlow(self.repo).init()
        mgr = FeatureBranchManager(gitflow)

        dc0 = gitflow.develop().commit
        mgr.merge('recursion', 'devel')
        dc1 = gitflow.develop().commit

        # Assert no merge commit has been made
        self.assertEqual(1, len(dc1.parents))
        self.assertEqual('Made the definition of odd recursive.\n',
                dc1.message)

        # Assert develop branch advanced
        self.assertNotEqual(dc0, dc1)
        # Assert the target-branch is active
        self.assertEqual(gitflow.repo.active_branch.name, 'devel')
开发者ID:opicacek,项目名称:gitflow,代码行数:19,代码来源:test_branches.py


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