~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree_4.py

  • Committer: Patch Queue Manager
  • Date: 2012-01-27 14:28:32 UTC
  • mfrom: (6445.2.6 avoid-inventory)
  • Revision ID: pqm@pqm.ubuntu.com-20120127142832-qcv2y1c3i0mbt9bl
(jelmer) Avoid the use of inventories in a few more places. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1150
1150
                # _make_delta if we can't get the RevisionTree
1151
1151
                pass
1152
1152
            else:
1153
 
                delta = rev_tree.inventory._make_delta(basis_tree.inventory)
 
1153
                delta = rev_tree.inventory._make_delta(
 
1154
                    basis_tree.inventory)
1154
1155
                dirstate.update_basis_by_delta(delta, rev_id)
1155
1156
                updated = True
1156
1157
        if not updated:
1946
1947
 
1947
1948
    def path_content_summary(self, path):
1948
1949
        """See Tree.path_content_summary."""
1949
 
        id = self.inventory.path2id(path)
1950
 
        if id is None:
 
1950
        file_id = self.path2id(path)
 
1951
        if file_id is None:
1951
1952
            return ('missing', None, None, None)
1952
 
        entry = self._inventory[id]
 
1953
        entry = self.inventory[file_id]
1953
1954
        kind = entry.kind
1954
1955
        if kind == 'file':
1955
1956
            return (kind, entry.text_size, entry.executable, entry.text_sha1)
1970
1971
    def list_files(self, include_root=False, from_dir=None, recursive=True):
1971
1972
        # We use a standard implementation, because DirStateRevisionTree is
1972
1973
        # dealing with one of the parents of the current state
1973
 
        inv = self._get_inventory()
1974
1974
        if from_dir is None:
 
1975
            inv = self.inventory
1975
1976
            from_dir_id = None
1976
1977
        else:
1977
 
            from_dir_id = inv.path2id(from_dir)
 
1978
            inv = self.inventory
 
1979
            from_dir_id = self.path2id(from_dir)
1978
1980
            if from_dir_id is None:
1979
1981
                # Directory not versioned
1980
1982
                return