~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_workingtree/test_readonly.py

  • Committer: Tarmac
  • Author(s): Vincent Ladeuil
  • Date: 2017-01-30 14:42:05 UTC
  • mfrom: (6620.1.1 trunk)
  • Revision ID: tarmac-20170130144205-r8fh2xpmiuxyozpv
Merge  2.7 into trunk including fix for bug #1657238 [r=vila]

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
import time
22
22
 
23
23
from bzrlib import (
24
 
    errors,
25
24
    hashcache,
26
25
    tests,
27
26
    )
28
27
from bzrlib.tests.per_workingtree import TestCaseWithWorkingTree
29
28
 
 
29
from bzrlib.workingtree import InventoryWorkingTree
 
30
 
30
31
 
31
32
class TestReadonly(TestCaseWithWorkingTree):
32
33
 
78
79
        """Even if the tree is unclean, we should still handle readonly dirs."""
79
80
        # First create a tree
80
81
        tree = self.create_basic_tree()
 
82
        if not isinstance(tree, InventoryWorkingTree):
 
83
            raise tests.TestNotApplicable("requires inventory working tree")
81
84
 
82
85
        # XXX: *Ugly* *ugly* hack, we need the hashcache to think it is out of
83
86
        # date, but we don't want to actually wait 3 seconds doing nothing.
106
109
            if hack_dirstate:
107
110
                tree._dirstate._sha_cutoff_time = self._custom_cutoff_time
108
111
            # Make sure we check all the files
109
 
            for file_id in tree:
 
112
            for file_id in tree.all_file_ids():
110
113
                size = tree.get_file_size(file_id)
111
114
                sha1 = tree.get_file_sha1(file_id)
112
115
        finally: