/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/blackbox/test_commit.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-09-25 20:19:21 UTC
  • mfrom: (2833.2.4 bugtest.140419)
  • Revision ID: pqm@pqm.ubuntu.com-20070925201921-vjahqpm8bfx6bbvn
test for bug #140419 

Show diffs side-by-side

added added

removed removed

Lines of Context:
521
521
        last_rev = tree.branch.repository.get_revision(tree.last_revision())
522
522
        properties = last_rev.properties
523
523
        self.assertEqual('John Doe', properties['author'])
 
524
 
 
525
    def test_partial_commit_with_renames_in_tree(self):
 
526
        # this test illustrates bug #140419
 
527
        t = self.make_branch_and_tree('.')
 
528
        self.build_tree(['dir/', 'dir/a', 'test'])
 
529
        t.add(['dir/', 'dir/a', 'test'])
 
530
        t.commit('initial commit')
 
531
        # important part: file dir/a should change parent
 
532
        # and should appear before old parent
 
533
        # then during partial commit we have error
 
534
        # parent_id {dir-XXX} not in inventory
 
535
        t.rename_one('dir/a', 'a')
 
536
        self.build_tree_contents([('test', 'changes in test')])
 
537
        # partial commit
 
538
        out, err = self.run_bzr('commit test -m "partial commit"')
 
539
        self.assertEquals('', out)
 
540
        self.assertContainsRe(err, r'modified test\nCommitted revision 2.')