66
66
' Joe Foo 2007-12-04 commit 3c\n',
69
def test_repeated_pending_merge(self):
70
# It is currently possible to merge the same thing 2x with 'merge
71
# --force', so test that status still works in that case.
72
config.GlobalConfig().set_user_option('email', 'Joe Foo <joe@foo.com>')
73
tree = self.make_branch_and_tree('a')
74
tree.commit('commit 1', timestamp=1196796819, timezone=0)
75
tree2 = tree.bzrdir.sprout('b').open_workingtree()
76
tree2.commit('commit 2b', timestamp=1196796819, timezone=0)
77
rev3 = tree2.commit('commit 3b', timestamp=1196796819, timezone=0)
78
tree2.commit('commit 4b', timestamp=1196796819, timezone=0)
79
tree.merge_from_branch(tree2.branch)
80
tree.merge_from_branch(tree2.branch)
81
tree.merge_from_branch(tree2.branch, to_revision=rev3)
83
self.addCleanup(tree.unlock)
85
show_pending_merges(tree, output)
86
self.assertEqualDiff('pending merges:\n'
87
' Joe Foo 2007-12-04 commit 4b\n'
88
' Joe Foo 2007-12-04 commit 3b\n'
89
' Joe Foo 2007-12-04 commit 2b\n'
90
' Joe Foo 2007-12-04 commit 4b\n'
91
' Joe Foo 2007-12-04 commit 3b\n',
94
69
def test_with_pending_ghost(self):
95
70
"""Test when a pending merge is itself a ghost"""
96
71
tree = self.make_branch_and_tree('a')