~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/memorytree.py

  • Committer: Alexander Belchenko
  • Date: 2007-10-04 05:50:44 UTC
  • mfrom: (2881 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2884.
  • Revision ID: bialix@ukr.net-20071004055044-pb88kgkfayawro8n
merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
98
98
            return None, False, None
99
99
        return entry.kind, entry.executable, None
100
100
 
 
101
    def path_content_summary(self, path):
 
102
        """See Tree.path_content_summary."""
 
103
        id = self.path2id(path)
 
104
        if id is None:
 
105
            return 'missing', None, None, None
 
106
        kind = self.kind(id)
 
107
        if kind == 'file':
 
108
            bytes = self._file_transport.get_bytes(path)
 
109
            size = len(bytes)
 
110
            executable = self._inventory[id].executable
 
111
            sha1 = None # no stat cache
 
112
            return (kind, size, executable, sha1)
 
113
        elif kind == 'directory':
 
114
            # memory tree does not support nested trees yet.
 
115
            return kind, None, None, None
 
116
        elif kind == 'symlink':
 
117
            raise NotImplementedError('symlink support')
 
118
        else:
 
119
            raise NotImplementedError('unknown kind')
 
120
 
101
121
    def _file_size(self, entry, stat_value):
102
122
        """See Tree._file_size."""
103
123
        if entry is None: