~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_commit.py

  • Committer: Aaron Bentley
  • Date: 2006-07-11 15:04:57 UTC
  • mto: This revision was merged to the branch mainline in revision 1858.
  • Revision ID: abentley@panoramicfeedback.com-20060711150457-d4c96e9c60843973
Ensure commit respects file spec when committing removals

Show diffs side-by-side

added added

removed removed

Lines of Context:
507
507
            ('deleted', 'filetoremove'),
508
508
            ],
509
509
            reporter.calls)
 
510
 
 
511
    def test_commit_removals_respects_filespec(self):
 
512
        """Commit respects the specified_files for removals."""
 
513
        tree = self.make_branch_and_tree('.')
 
514
        self.build_tree(['a', 'b'])
 
515
        tree.add(['a', 'b'])
 
516
        tree.commit('added a, b')
 
517
        tree.remove(['a', 'b'])
 
518
        Commit().commit(message='removed a', working_tree=tree, 
 
519
                        specific_files='a')
 
520
        basis = tree.basis_tree().inventory
 
521
        self.assertIs(None, basis.path2id('a'))
 
522
        self.assertFalse(basis.path2id('b') is None)