~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 22:15:52 UTC
  • mfrom: (1185.13.2)
  • mto: This revision was merged to the branch mainline in revision 1420.
  • Revision ID: robertc@robertcollins.net-20051006221552-9b15c96fa504e0ad
mergeĀ fromĀ upstream

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')