qannotate: crash when trying to annotate a deleted file.

Bug #803235 reported by Marius Kruger
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QBzr
Confirmed
High
Unassigned

Bug Description

This could be a resurrection of https://bugs.launchpad.net/qbzr/+bug/419790

I get this when trying to annotate a file that has been deleted, i.e. it is not in the working tree.
The commandline annotate can annotate the revision I'm interested in just fine.
As a workaround I branched the revision I'm interested in and qannotated that.

Steps to reproduce using the qbzr source from the above mentioned bug:

Open qlog in qbzr branch.
go to rev 240
Right click on "_ext.cpp => lib/_ext.cpp", click on annotate.

What happens: It crashes (using bzr and qbzr trunks):

Wed 2011-06-29 01:47:35 +0200
0.108 bazaar version: 2.4.0dev5
0.109 bzr arguments: [u'qlog']
0.148 looking for plugins in /home/amanica/.bazaar/plugins
0.361 looking for plugins in /stf_fast/prj/bzr/bzr.repo/bzr.dev/bzrlib/plugins
0.361 Plugin name launchpad already loaded
0.363 looking for plugins in /usr/lib/python2.7/dist-packages/bzrlib/plugins
0.363 Plugin name launchpad already loaded
0.363 Plugin name weave_fmt already loaded
0.363 Plugin name news_merge already loaded
0.363 Plugin name changelog_merge already loaded
0.363 Plugin name netrc_credential_store already loaded
0.363 Plugin name bash_completion already loaded
0.370 encoding stdout as sys.stdout encoding 'UTF-8'
0.716 opening working tree '/stf_fast/prj/bzr/plugins/qbzr'
12.398 Traceback (most recent call last):
  File "/home/amanica/.bazaar/plugins/qbzr/lib/util.py", line 908, in run_in_loading_queue
    f(*args, **kargs)
  File "/home/amanica/.bazaar/plugins/qbzr/lib/logmodel.py", line 116, in load
    super(WorkingTreeHasChangeFilter, self).load()
  File "/home/amanica/.bazaar/plugins/qbzr/lib/loggraphviz.py", line 1539, in load
    if self.has_changes(tree):
  File "/home/amanica/.bazaar/plugins/qbzr/lib/loggraphviz.py", line 1566, in has_changes
    for file_id in self.file_ids]
  File "/stf_fast/prj/bzr/bzr.repo/bzr.dev/bzrlib/decorators.py", line 154, in read_locked
    result = unbound(self, *args, **kwargs)
  File "/stf_fast/prj/bzr/bzr.repo/bzr.dev/bzrlib/workingtree_4.py", line 481, in id2path
    raise errors.NoSuchId(tree=self, file_id=file_id)
NoSuchId: The file id "_ext.cpp-20071223174633-d2tjggdxlg3hlbd7-1" is not present in the tree <WorkingTree6 of /stf_fast/prj/bzr/plugins/qbzr>.

12.398 Traceback (most recent call last):
  File "/home/amanica/.bazaar/plugins/qbzr/lib/util.py", line 908, in run_in_loading_queue
    f(*args, **kargs)
  File "/home/amanica/.bazaar/plugins/qbzr/lib/logmodel.py", line 116, in load
    super(WorkingTreeHasChangeFilter, self).load()
  File "/home/amanica/.bazaar/plugins/qbzr/lib/loggraphviz.py", line 1539, in load
    if self.has_changes(tree):
  File "/home/amanica/.bazaar/plugins/qbzr/lib/loggraphviz.py", line 1566, in has_changes
    for file_id in self.file_ids]
  File "/stf_fast/prj/bzr/bzr.repo/bzr.dev/bzrlib/decorators.py", line 154, in read_locked
    result = unbound(self, *args, **kwargs)
  File "/stf_fast/prj/bzr/bzr.repo/bzr.dev/bzrlib/workingtree_4.py", line 481, in id2path
    raise errors.NoSuchId(tree=self, file_id=file_id)
NoSuchId: The file id "_ext.cpp-20071223174633-d2tjggdxlg3hlbd7-1" is not present in the tree <WorkingTree6 of /stf_fast/prj/bzr/plugins/qbzr>.

Marius Kruger (amanica)
description: updated
Revision history for this message
Alexander Belchenko (bialix) wrote :

Based on traceback I see we're trying to get the file from workig tree. Apparetly deleted file is not here.

Could you say, please, have your tree had uncommitted changes?

Changed in qbzr:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Marius Kruger (amanica) wrote : Re: [Bug 803235] Re: qannotate: crash when trying to annotate a deleted file.

On 29 June 2011 09:59, Alexander Belchenko <email address hidden> wrote:

> Based on traceback I see we're trying to get the file from workig tree.
> Apparetly deleted file is not here.
>

Yes it has been deleted a number of revisions back.

> Could you say, please, have your tree had uncommitted changes?
>

Yes, I wanted to check something before committing, but I don't think that
makes a difference:
I could reproduce it now with the qbzr tree (with no uncommitted stuff) with
the steps in the original bug.

Revision history for this message
Alexander Belchenko (bialix) wrote : Re: [Bug 803235] Re: qannotate: crash when trying to annotate a deleted file.

Marius Kruger пишет:
> On 29 June 2011 09:59, Alexander Belchenko <email address hidden> wrote:
>> Could you say, please, have your tree had uncommitted changes?
>
> Yes, I wanted to check something before committing, but I don't think that
> makes a difference:
> I could reproduce it now with the qbzr tree (with no uncommitted stuff) with
> the steps in the original bug.

Thank you. I think it should be pretty easy to fix it: we just need to
use RevisionTree instead of WorkingTree somewhere. I just can't say off
hands where exactly.

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.