/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

lock a basis tree during a commit test.

Show diffs side-by-side

added added

removed removed

Lines of Context:
539
539
        tree.commit('added a, b')
540
540
        tree.remove(['a', 'b'])
541
541
        tree.commit('removed a', specific_files='a')
542
 
        basis = tree.basis_tree().inventory
543
 
        self.assertIs(None, basis.path2id('a'))
544
 
        self.assertFalse(basis.path2id('b') is None)
 
542
        basis = tree.basis_tree()
 
543
        tree.lock_read()
 
544
        try:
 
545
            self.assertIs(None, basis.path2id('a'))
 
546
            self.assertFalse(basis.path2id('b') is None)
 
547
        finally:
 
548
            tree.unlock()
545
549
 
546
550
    def test_commit_saves_1ms_timestamp(self):
547
551
        """Passing in a timestamp is saved with 1ms resolution"""