/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: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-03-24 14:07:08 UTC
  • mfrom: (6913.2.1 memorytree-fail-early)
  • Revision ID: breezy.the.bot@gmail.com-20180324140708-k5ke40tn765tl70t
Fail early in MemoryTree.unversion() when passing in paths that don't exist.

Merged from https://code.launchpad.net/~jelmer/brz/memorytree-fail-early/+merge/342036

Show diffs side-by-side

added added

removed removed

Lines of Context:
270
270
            # is not relevant to memory tree. Until that is done in unlock by
271
271
            # working tree, we cannot share the implementation.
272
272
            if file_ids is None:
273
 
                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)
274
279
            for file_id in file_ids:
275
280
                if self._inventory.has_id(file_id):
276
281
                    self._inventory.remove_recursive_id(file_id)