~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_branchbuilder.py

  • Committer: John Arbash Meinel
  • Date: 2008-07-22 19:45:01 UTC
  • mto: (3514.4.6 merge_lca_multi)
  • mto: This revision was merged to the branch mainline in revision 3590.
  • Revision ID: john@arbash-meinel.com-20080722194501-mmxs3jkr6wqm7lj6
Allow setting the commit message.

Show diffs side-by-side

added added

removed removed

Lines of Context:
130
130
                              (u'b', 'b-id', 'directory'),
131
131
                             ], rev_tree)
132
132
 
 
133
    def test_commit_message_default(self):
 
134
        builder = BranchBuilder(self.get_transport().clone('foo'))
 
135
        rev_id = builder.build_snapshot(None, None,
 
136
            [('add', (u'', None, 'directory', None))])
 
137
        branch = builder.get_branch()
 
138
        rev = branch.repository.get_revision(rev_id)
 
139
        self.assertEqual(u'commit 1', rev.message)
 
140
 
 
141
    def test_commit_message_supplied(self):
 
142
        builder = BranchBuilder(self.get_transport().clone('foo'))
 
143
        rev_id = builder.build_snapshot(None, None,
 
144
            [('add', (u'', None, 'directory', None))],
 
145
            message=u'Foo')
 
146
        branch = builder.get_branch()
 
147
        rev = branch.repository.get_revision(rev_id)
 
148
        self.assertEqual(u'Foo', rev.message)
 
149
 
133
150
    def test_modify_file(self):
134
151
        builder = self.build_a_rev()
135
152
        rev_id2 = builder.build_snapshot('B-id', None,