qannotate error when clicking on line which origin is dotted revno

Bug #417895 reported by Alexander Belchenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QBzr
Fix Released
Critical
Gary van der Merwe

Bug Description

Running qbrowse -> qannotate for qbzr/lib/subprocess.py (latest committed revision, not wt) and click on any line where revision number is dotted I've got error:

bzr: ERROR: exceptions.AttributeError: 'tuple' object has no attribute 'index'

Traceback (most recent call last):
  File "C:\work\Bazaar\plugins\qbzr\lib\annotate.py", line 464, in setRevisionByLine
  File "C:\work\Bazaar\plugins\qbzr\lib\logmodel.py", line 155, in ensure_rev_visible
  File "C:\work\Bazaar\plugins\qbzr\lib\logmodel.py", line 119, in compute_lines
  File "C:\work\Bazaar\plugins\qbzr\lib\loggraphprovider.py", line 1258, in compute_graph_lines
AttributeError: 'tuple' object has no attribute 'index'

bzr 1.18 on python 2.5.4 (win32)
arguments: ['C:\\Program Files\\Bazaar\\bzr.exe', 'qbrowse']
encoding: 'cp1251', fsenc: 'mbcs', lang: 'ru'
plugins:
  bzrtools C:\Program Files\Bazaar\plugins\bzrtools [1.18]
  explorer C:\work\Bazaar\plugins\explorer [0.7dev]
  fastimport C:\work\Bazaar\plugins\fastimport [0.8dev]
  launchpad C:\Program Files\Bazaar\plugins\launchpad [1.18]
  qbzr C:\work\Bazaar\plugins\qbzr [0.15dev]
  rebase C:\work\Bazaar\plugins\rebase [0.5.4dev]
  repoalias C:\work\Bazaar\plugins\repoalias [unknown]
  scmproj C:\work\Bazaar\plugins\scmproj [0.4.5.dev.2]
  x_bit C:\work\Bazaar\plugins\x_bit [1.0]

Tags: qannotate

Related branches

Changed in qbzr:
importance: Undecided → Critical
tags: added: qannotate
Revision history for this message
Alexander Belchenko (bialix) wrote :

This may happens not with all lines (or revnos?). E.g. this error triggered on line 428 of subprocess.py (revno 419.4.5).

Changed in qbzr:
status: New → Confirmed
Changed in qbzr:
assignee: nobody → Gary van der Merwe (garyvdm)
milestone: none → 0.14.1
Revision history for this message
Gary van der Merwe (garyvdm) wrote :

Alexander: Even after following comment #1, I was not able to reproduce this. :-(

Changed in qbzr:
assignee: Gary van der Merwe (garyvdm) → nobody
Revision history for this message
Gary van der Merwe (garyvdm) wrote :

Alexander: If you can still reproduce this, the following would be use full:

* set BZR_PDB=1
* Reproduce
* (pdb) ?parent
* (pdb) ?last_parent

I'm not sure which one is the tuple.

Revision history for this message
Alexander Belchenko (bialix) wrote :

It's 100% reproducible for me. Here is result of pdb session, I've clicked on line 434 in trunk subprocess.py, line origin 419.4.5, author Gary:

C:\work\Bazaar\repos\qbzr-repo-1.9\qrun>bzr qbw
bzr: ERROR: exceptions.AttributeError: 'tuple' object has no attribute 'index'

Traceback (most recent call last):
  File "C:\work\Bazaar\plugins\qbzr\lib\annotate.py", line 464, in setRevisionByLine
  File "C:\work\Bazaar\plugins\qbzr\lib\logmodel.py", line 155, in ensure_rev_visible
  File "C:\work\Bazaar\plugins\qbzr\lib\logmodel.py", line 119, in compute_lines
  File "C:\work\Bazaar\plugins\qbzr\lib\loggraphprovider.py", line 1258, in compute_graph_lines
AttributeError: 'tuple' object has no attribute 'index'

bzr 1.18 on python 2.5.4 (win32)
arguments: ['C:\\Program Files\\Bazaar\\bzr.EXE', 'qbw']
encoding: 'cp1251', fsenc: 'mbcs', lang: 'ru'
plugins:
  bzrtools C:\Program Files\Bazaar\plugins\bzrtools [1.18]
  explorer C:\work\Bazaar\plugins\explorer [0.7]
  fastimport C:\work\Bazaar\plugins\fastimport [0.8dev]
  launchpad C:\Program Files\Bazaar\plugins\launchpad [1.18]
  qbzr C:\work\Bazaar\plugins\qbzr [0.15dev]
  rebase C:\work\Bazaar\plugins\rebase [0.5.4dev]
  repoalias C:\work\Bazaar\plugins\repoalias [unknown]
  scmproj C:\work\Bazaar\plugins\scmproj [0.4.5.dev.2]
  x_bit C:\work\Bazaar\plugins\x_bit [1.0]
*** Bazaar has encountered an internal error.
    Please report a bug at https://bugs.launchpad.net/bzr/+filebug
    including this traceback, and a description of what you
    were doing when the error occurred.
**** entering debugger
> c:\work\bazaar\plugins\qbzr\lib\loggraphprovider.py(1258)compute_graph_lines()
(Pdb) ?parent
*** No help on parent
(Pdb) parent
RevisionInfo <582 <email address hidden>>
(Pdb) last_parent
(RevisionInfo <419 <email address hidden>>, False)
(Pdb)

What else I can do?

I think you can't reproduce this because it's your revision and qbzr fears you ;-)

Revision history for this message
Alexander Belchenko (bialix) wrote :

last_parent seems to be simple tuple instead of custom object. last_parent has no attribute 'index':

> c:\work\bazaar\plugins\qbzr\lib\loggraphprovider.py(1258)compute_graph_lines()
(Pdb) dir(parent)
['__class__', '__delattr__', '__doc__', '__getattribute__', '__hash__', '__init__', '__module__', '__new__', '__redu
ce__', '__reduce_ex__', '__repr__', '__setattr__', '__slots__', '__str__', '_revno_str', 'branch_id', 'col_index', '
color', 'end_of_merge', 'f_index', 'filter_cache', 'get_revno_str', 'index', 'lines', 'merge_depth', 'merged_by', 'm
erges', 'revid', 'revno_sequence', 'revno_str', 'twisty_branch_ids', 'twisty_state']
(Pdb) dir(last_parent)
['__add__', '__class__', '__contains__', '__delattr__', '__doc__', '__eq__', '__ge__', '__getattribute__', '__getite
m__', '__getnewargs__', '__getslice__', '__gt__', '__hash__', '__init__', '__iter__', '__le__', '__len__', '__lt__',
 '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__rmul__', '__setattr__', '__str__']
(Pdb)

Revision history for this message
Gary van der Merwe (garyvdm) wrote :

Please will you see if lp:~qbzr-dev/qbzr/Bug417895 fixes this.

Revision history for this message
Alexander Belchenko (bialix) wrote : Re: [Bug 417895] Re: qannotate error when clicking on line which origin is dotted revno

Gary van der Merwe пишет:
> Please will you see if lp:~qbzr-dev/qbzr/Bug417895 fixes this.

Yes, this branch works OK. Please, land it.

Changed in qbzr:
assignee: nobody → Gary van der Merwe (garyvdm)
status: Confirmed → Fix Committed
Changed in qbzr:
status: Fix Committed → Fix Released
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.