~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/test_commit.py

  • Committer: Robert Collins
  • Date: 2005-10-06 07:03:33 UTC
  • Revision ID: robertc@robertcollins.net-20051006070333-05cb8d7b08974aec
when committing a specific file, include all its parents

Show diffs side-by-side

added added

removed removed

Lines of Context:
234
234
        for i in range(4):
235
235
            anc = b.get_ancestry(rev_ids[i])
236
236
            eq(anc, [None] + rev_ids[:i+1])
 
237
 
 
238
    def test_commit_new_subdir_child_selective(self):
 
239
        b = Branch.initialize('.')
 
240
        self.build_tree(['dir/', 'dir/file1', 'dir/file2'])
 
241
        b.add(['dir', 'dir/file1', 'dir/file2'],
 
242
              ['dirid', 'file1id', 'file2id'])
 
243
        b.commit('dir/file1', specific_files=['dir/file1'], rev_id='1')
 
244
        inv = b.get_inventory('1')
 
245
        self.assertEqual('1', inv['dirid'].revision)
 
246
        self.assertEqual('1', inv['file1id'].revision)
 
247
        # FIXME: This should raise a KeyError I think, rbc20051006
 
248
        self.assertRaises(BzrError, inv.__getitem__, 'file2id')