~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_workingtree/test_commit.py

  • Committer: Robert Collins
  • Date: 2009-07-15 05:54:37 UTC
  • mto: (4536.2.2 integration)
  • mto: This revision was merged to the branch mainline in revision 4539.
  • Revision ID: robertc@robertcollins.net-20090715055437-ozlxxlwmcc9v1qyz
Defer doing unversioning of file ids during commit to after completing branch operations. (Robert Collins, bug 282402)

Show diffs side-by-side

added added

removed removed

Lines of Context:
280
280
        wt2.merge_from_branch(wt.branch)
281
281
        wt2.commit('merged kind change')
282
282
 
 
283
    def test_commit_aborted_does_not_apply_automatic_changes_bug_282402(self):
 
284
        wt = self.make_branch_and_tree('.')
 
285
        wt.add(['a'], ['a-id'], ['file'])
 
286
        def fail_message(obj):
 
287
            raise errors.BzrCommandError("empty commit message")
 
288
        self.assertRaises(errors.BzrCommandError, wt.commit,
 
289
            message_callback=fail_message)
 
290
        self.assertEqual('a', wt.id2path('a-id'))
 
291
 
283
292
    def test_local_commit_ignores_master(self):
284
293
        # a --local commit does not require access to the master branch
285
294
        # at all, or even for it to exist.