Occasional AttributeError from Tree.get_file_by_path

Bug #666897 reported by Michael Gliwinski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Medium
Jelmer Vernooij

Bug Description

Tree.get_file_by_path tries to use self._inventory.path2id instead of
self.path2id which may cause an AttributeError exception to be raised when
self._inventory is None. E.g. WorkingTree4+ objects reimplement self.path2id
so it doesn't use self._inventory.

I think Tree.get_file_by_path would use self.path2id which should make the
method work for WorkingTree4+ objects as well.

I'm not certain in which exact situations this is a problem, I encountered it
while attempting some modifications in bzr-upload plugin.

See ml for more info and discussion:
https://lists.ubuntu.com/archives/bazaar/2010q4/070748.html

Tags: api

Related branches

Changed in bzr:
assignee: nobody → Michael Gliwinski (tzeentch-gm)
Revision history for this message
Martin Pool (mbp) wrote :
Changed in bzr:
importance: Undecided → Medium
status: New → In Progress
Jelmer Vernooij (jelmer)
tags: added: api
Jelmer Vernooij (jelmer)
Changed in bzr:
assignee: Michael Gliwinski (tzeentch-gm) → Jelmer Vernooij (jelmer)
Jelmer Vernooij (jelmer)
Changed in bzr:
status: In Progress → Fix Released
milestone: none → 2.5b4
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.