84
def make_multiple_pending_tree(self):
85
from bzrlib import config
86
config.GlobalConfig().set_user_option('email',
87
'Bilbo Baggins <bb@hobbit.net>')
88
tree = self.make_branch_and_tree('a')
89
tree.commit('Initial checkin.', timestamp=1230912900, timezone=0)
90
tree2 = tree.bzrdir.clone('b').open_workingtree()
91
tree.commit('Minor tweak.', timestamp=1231977840, timezone=0)
92
tree2.commit('Feature X work.', timestamp=1233186240, timezone=0)
93
tree3 = tree2.bzrdir.clone('c').open_workingtree()
94
tree2.commit('Feature X finished.', timestamp=1233187680, timezone=0)
95
tree3.commit('Feature Y, based on initial X work.',
96
timestamp=1233285960, timezone=0)
97
tree.merge_from_branch(tree2.branch)
98
tree.merge_from_branch(tree3.branch)
101
def test_commit_template_pending_merges(self):
102
"""Test building a commit message template when there are pending
103
merges. The commit message should show all pending merge revisions,
104
as does 'status -v', not only the merge tips.
106
working_tree = self.make_multiple_pending_tree()
107
template = msgeditor.make_commit_message_template(working_tree, None)
108
self.assertEqualDiff(template,
111
Bilbo Baggins 2009-01-29 Feature X finished.
112
Bilbo Baggins 2009-01-28 Feature X work.
113
Bilbo Baggins 2009-01-30 Feature Y, based on initial X work.
84
116
def test_commit_template_encoded(self):
85
117
"""Test building a commit message template"""
86
118
working_tree = self.make_uncommitted_tree()