[qannotate] Got traceback using latest bzr.dev

Bug #162505 reported by Szilveszter Farkas
2
Affects Status Importance Assigned to Milestone
QBzr
Fix Released
High
Alexander Belchenko

Bug Description

Got the following traceback when I ran qannotate on latest bzr.dev NEWS file with latest bzr.dev:

---
bzr.dev szilveszter$ bzr qannotate NEWS
bzr: ERROR: bzrlib.errors.NoSuchRevision: KnitRevisionStore(VersionedFileStore('file:///Users/szilveszter/Development/Repositories/Bazaar/bzr.dev/.bzr/repository/')) has no revision <email address hidden>

Traceback (most recent call last):
  File "/Library/Python/2.5/site-packages/bzrlib/commands.py", line 802, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/Library/Python/2.5/site-packages/bzrlib/commands.py", line 758, in run_bzr
    ret = run(*run_argv)
  File "/Library/Python/2.5/site-packages/bzrlib/commands.py", line 492, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/Library/Python/2.5/site-packages/bzrlib/plugins/qbzr/__init__.py", line 111, in run
    revisions = branch.repository.get_revisions(w.versions())
  File "/Library/Python/2.5/site-packages/bzrlib/decorators.py", line 127, in read_locked
    return unbound(self, *args, **kwargs)
  File "/Library/Python/2.5/site-packages/bzrlib/repository.py", line 992, in get_revisions
    return self._get_revisions(revision_ids)
  File "/Library/Python/2.5/site-packages/bzrlib/decorators.py", line 127, in read_locked
    return unbound(self, *args, **kwargs)
  File "/Library/Python/2.5/site-packages/bzrlib/repository.py", line 1001, in _get_revisions
    self.get_transaction())
  File "/Library/Python/2.5/site-packages/bzrlib/store/revision/knit.py", line 88, in get_revisions
    texts = self._get_serialized_revisions(revision_ids, transaction)
  File "/Library/Python/2.5/site-packages/bzrlib/store/revision/knit.py", line 106, in _get_serialized_revisions
    raise errors.NoSuchRevision(self, e.revision_id)
NoSuchRevision: KnitRevisionStore(VersionedFileStore('file:///Users/szilveszter/Development/Repositories/Bazaar/bzr.dev/.bzr/repository/')) has no revision <email address hidden>

bzr 0.93.0.dev.0 on python 2.5.1.final.0 (darwin)
arguments: ['/usr/local/bin/bzr', 'qannotate', 'NEWS']
encoding: 'UTF-8', fsenc: 'utf-8', lang: 'hu_HU.UTF-8'
plugins:
  launchpad /Library/Python/2.5/site-packages/bzrlib/plugins/launchpad [unknown]
  multiparent /Library/Python/2.5/site-packages/bzrlib/plugins/multiparent.pyc [unknown]
  qbzr /Library/Python/2.5/site-packages/bzrlib/plugins/qbzr [0.7.0]

** Please send this report to <email address hidden>
   with a description of what you were doing when the
   error occurred.
---

Running 'bzr annotate NEWS' in the same directory gives the expected output without any problems.

I've tried a bunch of other files. Some of them did work, some others did not. (Failed the same way as above.)

If you need more info, don't hesitate to reply, I'll try to debug the problem if you help me. (The computer is running Mac OS X 10.5, with built-in Python 2.5.1)

Related branches

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

It's strange, because I can't reproduce it on win32 now. Can you say what revno of bzr.dev you're using?

I found qannotate is slightly suboptimal, because it try to collect info about each revisions that touch annotated file, not only revisions that touch annotated file last.
I think I ran into this too, probably because in shared repo there is branches that touch the file later. I'm not sure.

Not sure how to reproduce it. Can you run qannotate in stand-alone branch, not in branch that resides in shared repo?

Changed in qbzr:
status: New → Incomplete
Revision history for this message
Szilveszter Farkas (phanatic) wrote :

bzr.dev revno installed: 2983

The branch I was testing on is not in a shared repository:

$ bzr info
Standalone tree (format: dirstate)
Location:
  branch root: .

Related branches:
  parent branch: http://bazaar-vcs.org/bzr/bzr.dev/

Revision history for this message
Alexander Belchenko (bialix) wrote : Re: [Bug 162505] Re: [qannotate] Got traceback using latest bzr.dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Szilveszter Farkas пишет:
> bzr.dev revno installed: 2983

Just check on my win32 box. I can't reproduce it with standalone bzr.dev revno 2983.
It's hard to debug problem without reproducing it first.

Probably help from bzr.dev core experts needed here.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHPJYlzYr338mxwCURAnw+AJ0RydRXuv/tqec2uD1pxfS2AsShxQCfcazy
LGCB9HhJAikerECH01KzSWw=
=MWf8
-----END PGP SIGNATURE-----

Revision history for this message
Szilveszter Farkas (phanatic) wrote :

Got the same traceback using qbzr main branch, bzr.dev 2998 on an Ubuntu 7.10 box. (The only difference is that the bzr.dev branch on Ubuntu is in knit format.)

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

OK. Discussion in bzr ML reveal that this bug occurs because qannotte try to obtain ghost revision.
IMO, it's related to bug #151458

Changed in qbzr:
importance: Undecided → High
status: Incomplete → Confirmed
Changed in qbzr:
milestone: none → 0.7.1
Changed in qbzr:
assignee: nobody → bialix
status: Confirmed → In Progress
Revision history for this message
Alexander Belchenko (bialix) wrote :

fixed in branch 0.7.1 revno 164.

Szilveszter, can you try latest version from the 0.7.1 branch and check the fix on MacOSX?

Changed in qbzr:
status: In Progress → Fix Committed
Revision history for this message
Szilveszter Farkas (phanatic) wrote :

It works now. Thanks a lot for fixing this bug!

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

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Szilveszter Farkas пишет:
> It works now. Thanks a lot for fixing this bug!

Great. And thank you for testing ;-)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHPsNozYr338mxwCURAj3mAKCUM1vDb0I2dqMlamJ0MAEfO3C4yQCfdURr
RirywckcGf9ODFZZhS9j/cg=
=3aWE
-----END PGP SIGNATURE-----

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.