~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree_4.py

  • Committer: John Arbash Meinel
  • Date: 2011-04-08 12:28:05 UTC
  • mfrom: (5771 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5775.
  • Revision ID: john@arbash-meinel.com-20110408122805-qdo9uc2dtc9mzoic
Merge bzr 5771, make sure to have the latest create-file changes, etc.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
import errno
32
32
import stat
33
33
 
34
 
import bzrlib
35
34
from bzrlib import (
36
35
    bzrdir,
37
36
    cache_utf8,
38
37
    debug,
39
38
    dirstate,
40
39
    errors,
 
40
    filters as _mod_filters,
41
41
    generate_ids,
42
42
    osutils,
43
43
    revision as _mod_revision,
46
46
    transform,
47
47
    views,
48
48
    )
49
 
import bzrlib.branch
50
 
import bzrlib.ui
51
49
""")
52
50
 
53
51
from bzrlib.decorators import needs_read_lock, needs_write_lock
54
 
from bzrlib.filters import filtered_input_file, internal_size_sha_file_byname
55
52
from bzrlib.inventory import Inventory, ROOT_ID, entry_factory
56
53
from bzrlib.lock import LogicalLockResult
57
54
from bzrlib.mutabletree import needs_tree_write_lock
62
59
    realpath,
63
60
    safe_unicode,
64
61
    )
65
 
from bzrlib.trace import mutter
66
62
from bzrlib.transport.local import LocalTransport
67
63
from bzrlib.tree import InterTree
68
64
from bzrlib.tree import Tree
85
81
        self._format = _format
86
82
        self.bzrdir = _bzrdir
87
83
        basedir = safe_unicode(basedir)
88
 
        mutter("opening working tree %r", basedir)
 
84
        trace.mutter("opening working tree %r", basedir)
89
85
        self._branch = branch
90
86
        self.basedir = realpath(basedir)
91
87
        # if branch is at our basedir and is a format 6 or less
1324
1320
        """See dirstate.SHA1Provider.sha1()."""
1325
1321
        filters = self.tree._content_filter_stack(
1326
1322
            self.tree.relpath(osutils.safe_unicode(abspath)))
1327
 
        return internal_size_sha_file_byname(abspath, filters)[1]
 
1323
        return _mod_filters.internal_size_sha_file_byname(abspath, filters)[1]
1328
1324
 
1329
1325
    def stat_and_sha1(self, abspath):
1330
1326
        """See dirstate.SHA1Provider.stat_and_sha1()."""
1334
1330
        try:
1335
1331
            statvalue = os.fstat(file_obj.fileno())
1336
1332
            if filters:
1337
 
                file_obj = filtered_input_file(file_obj, filters)
 
1333
                file_obj = _mod_filters.filtered_input_file(file_obj, filters)
1338
1334
            sha1 = osutils.size_sha_file(file_obj)[1]
1339
1335
        finally:
1340
1336
            file_obj.close()