~tzeentch-gm/bzr/666897-get-file-by-path-attr-error

« back to all changes in this revision

Viewing changes to bzrlib/tree.py

  • Committer: Michael Gliwinski
  • Date: 2010-10-26 18:07:09 UTC
  • Revision ID: tzeentch.gm@gmail.com-20101026180709-gc2diialiuya4m47
Changed ``Tree.get_file_by_path`` to use path2id method instead of accessing _inventory directly.

Fixes occasional problem with WorkingTree 4+ which re-implements path2id which doesn't use _inventory.

Show diffs side-by-side

added added

removed removed

Lines of Context:
324
324
        raise NotImplementedError(self.get_file_size)
325
325
 
326
326
    def get_file_by_path(self, path):
327
 
        return self.get_file(self._inventory.path2id(path), path)
 
327
        return self.get_file(self.path2id(path), path)
328
328
 
329
329
    def iter_files_bytes(self, desired_files):
330
330
        """Iterate through file contents.