~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree_4.py

Merge direct pack access branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
    debug,
38
38
    dirstate,
39
39
    errors,
 
40
    filters as _mod_filters,
40
41
    generate_ids,
41
42
    osutils,
42
43
    revision as _mod_revision,
48
49
""")
49
50
 
50
51
from bzrlib.decorators import needs_read_lock, needs_write_lock
51
 
from bzrlib.filters import filtered_input_file, internal_size_sha_file_byname
52
52
from bzrlib.inventory import Inventory, ROOT_ID, entry_factory
53
53
from bzrlib.lock import LogicalLockResult
54
54
from bzrlib.mutabletree import needs_tree_write_lock
365
365
        state = self.current_dirstate()
366
366
        if stat_value is None:
367
367
            try:
368
 
                stat_value = os.lstat(file_abspath)
 
368
                stat_value = osutils.lstat(file_abspath)
369
369
            except OSError, e:
370
370
                if e.errno == errno.ENOENT:
371
371
                    return None
474
474
            self._must_be_locked()
475
475
            if not path:
476
476
                path = self.id2path(file_id)
477
 
            mode = os.lstat(self.abspath(path)).st_mode
 
477
            mode = osutils.lstat(self.abspath(path)).st_mode
478
478
            return bool(stat.S_ISREG(mode) and stat.S_IEXEC & mode)
479
479
 
480
480
    def all_file_ids(self):
1320
1320
        """See dirstate.SHA1Provider.sha1()."""
1321
1321
        filters = self.tree._content_filter_stack(
1322
1322
            self.tree.relpath(osutils.safe_unicode(abspath)))
1323
 
        return internal_size_sha_file_byname(abspath, filters)[1]
 
1323
        return _mod_filters.internal_size_sha_file_byname(abspath, filters)[1]
1324
1324
 
1325
1325
    def stat_and_sha1(self, abspath):
1326
1326
        """See dirstate.SHA1Provider.stat_and_sha1()."""
1330
1330
        try:
1331
1331
            statvalue = os.fstat(file_obj.fileno())
1332
1332
            if filters:
1333
 
                file_obj = filtered_input_file(file_obj, filters)
 
1333
                file_obj = _mod_filters.filtered_input_file(file_obj, filters)
1334
1334
            sha1 = osutils.size_sha_file(file_obj)[1]
1335
1335
        finally:
1336
1336
            file_obj.close()