/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/memorytree.py

  • Committer: Jelmer Vernooij
  • Date: 2018-03-24 17:48:04 UTC
  • mfrom: (6921 work)
  • mto: This revision was merged to the branch mainline in revision 6923.
  • Revision ID: jelmer@jelmer.uk-20180324174804-xf22o05byoj12x1q
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
131
131
        else:
132
132
            raise NotImplementedError('unknown kind')
133
133
 
134
 
    def _file_size(self, entry, stat_value):
135
 
        """See Tree._file_size."""
136
 
        if entry is None:
137
 
            return 0
138
 
        return entry.text_size
139
 
 
140
134
    def get_parent_ids(self):
141
135
        """See Tree.get_parent_ids.
142
136
 
276
270
            # is not relevant to memory tree. Until that is done in unlock by
277
271
            # working tree, we cannot share the implementation.
278
272
            if file_ids is None:
279
 
                file_ids = {self.path2id(path) for path in paths}
 
273
                file_ids = set()
 
274
                for path in paths:
 
275
                    file_id = self.path2id(path)
 
276
                    if file_id is None:
 
277
                        raise errors.NoSuchFile(path)
 
278
                    file_ids.add(file_id)
280
279
            for file_id in file_ids:
281
280
                if self._inventory.has_id(file_id):
282
281
                    self._inventory.remove_recursive_id(file_id)