~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: 2006-07-12 13:56:14 UTC
  • mfrom: (1551.7.25 Aaron's mergeable stuff)
  • Revision ID: pqm@pqm.ubuntu.com-20060712135614-506cabdbbc31e947
commit respects filespec for removed files

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)