~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_commit.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-04-17 00:59:30 UTC
  • mfrom: (1551.15.4 Aaron's mergeable stuff)
  • Revision ID: pqm@pqm.ubuntu.com-20070417005930-rofskshyjsfzrahh
Fix ftp transport with servers that don't support atomic rename

Show diffs side-by-side

added added

removed removed

Lines of Context:
226
226
        wt.lock_read()
227
227
        try:
228
228
            self.check_inventory_shape(wt.read_working_inventory(),
229
 
                                       ['a/', 'a/hello', 'b/'])
 
229
                                       ['a', 'a/hello', 'b'])
230
230
        finally:
231
231
            wt.unlock()
232
232
 
236
236
        wt.lock_read()
237
237
        try:
238
238
            self.check_inventory_shape(wt.read_working_inventory(),
239
 
                                       ['a/', 'a/hello', 'a/b/'])
 
239
                                       ['a', 'a/hello', 'a/b'])
240
240
            self.check_inventory_shape(b.repository.get_revision_inventory(r3),
241
 
                                       ['a/', 'a/hello', 'a/b/'])
 
241
                                       ['a', 'a/hello', 'a/b'])
242
242
        finally:
243
243
            wt.unlock()
244
244
 
248
248
        wt.lock_read()
249
249
        try:
250
250
            self.check_inventory_shape(wt.read_working_inventory(),
251
 
                                       ['a/', 'a/b/hello', 'a/b/'])
 
251
                                       ['a', 'a/b/hello', 'a/b'])
252
252
        finally:
253
253
            wt.unlock()
254
254
 
681
681
        repository.add_inventory = raise_
682
682
        self.assertRaises(errors.NoSuchFile, tree.commit, message_callback=cb)
683
683
        self.assertFalse(cb.called)
684
 
 
685
 
    def test_selected_file_merge_commit(self):
686
 
        """Ensure the correct error is raised"""
687
 
        tree = self.make_branch_and_tree('foo')
688
 
        # pending merge would turn into a left parent
689
 
        tree.commit('commit 1')
690
 
        tree.add_parent_tree_id('example')
691
 
        self.build_tree(['foo/bar', 'foo/baz'])
692
 
        tree.add(['bar', 'baz'])
693
 
        err = self.assertRaises(errors.CannotCommitSelectedFileMerge,
694
 
            tree.commit, 'commit 2', specific_files=['bar', 'baz'])
695
 
        self.assertEqual(['bar', 'baz'], err.files)
696
 
        self.assertEqual('Selected-file commit of merges is not supported'
697
 
                         ' yet: files bar, baz', str(err))