~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-03-10 04:18:34 UTC
  • mfrom: (2330.1.1 bzr.ab.integration)
  • Revision ID: pqm@pqm.ubuntu.com-20070310041834-3f63de9e93982669
Allow files to change kind in Tree.list_files

Show diffs side-by-side

added added

removed removed

Lines of Context:
1013
1013
        self._control_files.put('inventory', sio)
1014
1014
        self._inventory_is_modified = False
1015
1015
 
 
1016
    def _kind(self, relpath):
 
1017
        return osutils.file_kind(self.abspath(relpath))
 
1018
 
1016
1019
    def list_files(self, include_root=False):
1017
1020
        """Recursively list all files as (path, class, kind, id, entry).
1018
1021
 
1033
1036
            yield ('', 'V', 'directory', inv.root.file_id, inv.root)
1034
1037
        # Convert these into local objects to save lookup times
1035
1038
        pathjoin = osutils.pathjoin
1036
 
        file_kind = osutils.file_kind
 
1039
        file_kind = self._kind
1037
1040
 
1038
1041
        # transport.base ends in a slash, we want the piece
1039
1042
        # between the last two slashes
1099
1102
 
1100
1103
                fk = file_kind(fap)
1101
1104
 
1102
 
                if f_ie:
1103
 
                    if f_ie.kind != fk:
1104
 
                        raise errors.BzrCheckError(
1105
 
                            "file %r entered as kind %r id %r, now of kind %r"
1106
 
                            % (fap, f_ie.kind, f_ie.file_id, fk))
1107
 
 
1108
1105
                # make a last minute entry
1109
1106
                if f_ie:
1110
1107
                    yield fp[1:], c, fk, f_ie.file_id, f_ie