本文整理汇总了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')
示例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')
示例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()])
示例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')
示例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')