~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/workingtree_implementations/test_flush.py

  • Committer: John Arbash Meinel
  • Date: 2009-02-23 15:29:35 UTC
  • mfrom: (3943.7.7 bzr.code_style_cleanup)
  • mto: This revision was merged to the branch mainline in revision 4033.
  • Revision ID: john@arbash-meinel.com-20090223152935-oel9m92mwcc6nb4h
Merge the removal of all trailing whitespace, and resolve conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
        # _set_inventory for now until add etc have lazy writes of
37
37
        # the inventory on unlock).
38
38
        tree = self.make_branch_and_tree('tree')
39
 
        # prepare for a series of changes that will modify the 
 
39
        # prepare for a series of changes that will modify the
40
40
        # inventory
41
41
        tree.lock_write()
42
42
        try:
53
53
            self.assertEqual('new-root', reference_tree.get_root_id())
54
54
        finally:
55
55
            tree.unlock()
56
 
            
 
56
 
57
57
    def test_flush_with_read_lock_fails(self):
58
58
        """Flush cannot be used during a read lock."""
59
59
        tree = self.make_branch_and_tree('t1')
62
62
            self.assertRaises(errors.NotWriteLocked, tree.flush)
63
63
        finally:
64
64
            tree.unlock()
65
 
            
 
65
 
66
66
    def test_flush_with_no_lock_fails(self):
67
67
        tree = self.make_branch_and_tree('t1')
68
68
        self.assertRaises(errors.NotWriteLocked, tree.flush)