/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: Alexander Belchenko
  • Date: 2007-10-04 05:50:44 UTC
  • mfrom: (2881 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2884.
  • Revision ID: bialix@ukr.net-20071004055044-pb88kgkfayawro8n
merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
import bzrlib
24
24
from bzrlib import (
 
25
    osutils,
25
26
    ignores,
26
27
    osutils,
27
28
    )
535
536
        last_rev = tree.branch.repository.get_revision(tree.last_revision())
536
537
        properties = last_rev.properties
537
538
        self.assertEqual('John Doe', properties['author'])
 
539
 
 
540
    def test_partial_commit_with_renames_in_tree(self):
 
541
        # this test illustrates bug #140419
 
542
        t = self.make_branch_and_tree('.')
 
543
        self.build_tree(['dir/', 'dir/a', 'test'])
 
544
        t.add(['dir/', 'dir/a', 'test'])
 
545
        t.commit('initial commit')
 
546
        # important part: file dir/a should change parent
 
547
        # and should appear before old parent
 
548
        # then during partial commit we have error
 
549
        # parent_id {dir-XXX} not in inventory
 
550
        t.rename_one('dir/a', 'a')
 
551
        self.build_tree_contents([('test', 'changes in test')])
 
552
        # partial commit
 
553
        out, err = self.run_bzr('commit test -m "partial commit"')
 
554
        self.assertEquals('', out)
 
555
        self.assertContainsRe(err, r'modified test\nCommitted revision 2.')