/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_commit.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-03-30 05:50:28 UTC
  • mfrom: (4183.5.9 commit-uses-ric)
  • Revision ID: pqm@pqm.ubuntu.com-20090330055028-lhmncpzf7ebkd2yc
(robertc) Teach commit to use record_iter_changes for some commits.
        (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
107
107
        tree2.unlock()
108
108
        self.assertEqual('version 2', text)
109
109
 
110
 
    def test_delete_commit(self):
111
 
        """Test a commit with a deleted file"""
 
110
    def test_missing_commit(self):
 
111
        """Test a commit with a missing file"""
112
112
        wt = self.make_branch_and_tree('.')
113
113
        b = wt.branch
114
114
        file('hello', 'w').write('hello world')
550
550
        this_tree.merge_from_branch(other_tree.branch)
551
551
        reporter = CapturingReporter()
552
552
        this_tree.commit('do the commit', reporter=reporter)
553
 
        self.assertEqual([
554
 
            ('change', 'unchanged', ''),
555
 
            ('change', 'unchanged', 'dirtoleave'),
556
 
            ('change', 'unchanged', 'filetoleave'),
 
553
        expected = set([
557
554
            ('change', 'modified', 'filetomodify'),
558
555
            ('change', 'added', 'newdir'),
559
556
            ('change', 'added', 'newfile'),
563
560
            ('renamed', 'renamed', 'filetoreparent', 'renameddir/reparentedfile'),
564
561
            ('deleted', 'dirtoremove'),
565
562
            ('deleted', 'filetoremove'),
566
 
            ],
567
 
            reporter.calls)
 
563
            ])
 
564
        result = set(reporter.calls)
 
565
        missing = expected - result
 
566
        new = result - expected
 
567
        self.assertEqual((set(), set()), (missing, new))
568
568
 
569
569
    def test_commit_removals_respects_filespec(self):
570
570
        """Commit respects the specified_files for removals."""