qlog remotebranch/file crashes if there are revisions missing in the current directory.

Bug #383359 reported by John Szakmeister
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QBzr
Fix Released
Medium
Gary van der Merwe

Bug Description

While trying to trace the source of another issue, I ran qbrowse against a remote repository that was unrelated to the branch I was working in. Unfortunately, that ended up with this:
>>>>>>>
bzr: ERROR: bzrlib.errors.NoSuchRevision: KnitPackRepository('file:///Users/jszakmeister/projects/bzr/.bzr/repository/') has no revision ('svn-v4:ce3d944c-a2ee-482b-a1f9-6ddad6138d0c::4',)

Traceback (most recent call last):
  File "/Users/jszakmeister/.bazaar/plugins/qbzr/lib/loggraphprovider.py", line 708, in load_filter_file_id
    revids[start:start + chunk_size])
  File "/Users/jszakmeister/.bazaar/plugins/qbzr/lib/util.py", line 928, in decorate
    run_in_loading_queue(f, *args, **kargs)
  File "/Users/jszakmeister/.bazaar/plugins/qbzr/lib/util.py", line 940, in run_in_loading_queue
    f(*args, **kargs)
  File "/Users/jszakmeister/.bazaar/plugins/qbzr/lib/logmodel.py", line 93, in load_filter_file_id_chunk
    LogGraphProvider.load_filter_file_id_chunk(self, repo, revids)
  File "/Users/jszakmeister/.bazaar/plugins/qbzr/lib/loggraphprovider.py", line 738, in load_filter_file_id_chunk
    revids):
  File "/Users/jszakmeister/Library/Python/2.5/site-packages/bzrlib/repository.py", line 2176, in _iter_inventories
    for text, revision_id in self._iter_inventory_xmls(revision_ids):
  File "/Users/jszakmeister/Library/Python/2.5/site-packages/bzrlib/repository.py", line 2187, in _iter_inventory_xmls
    raise errors.NoSuchRevision(self, record.key)
NoSuchRevision: KnitPackRepository('file:///Users/jszakmeister/projects/bzr/.bzr/repository/') has no revision ('svn-v4:ce3d944c-a2ee-482b-a1f9-6ddad6138d0c::4',)

bzr 1.15 on python 2.5.1 (darwin)
arguments: ['/Users/jszakmeister/bin/bzr', 'qbrowse', 'svn://svn.szakmeister.net/fsfsexplore/']
encoding: 'UTF-8', fsenc: 'utf-8', lang: 'en_US.UTF-8'
plugins:
  bzrtools /Users/jszakmeister/Library/Python/2.5/site-packages/bzrlib/plugins/bzrtools [1.13]
  explorer /Users/jszakmeister/.bazaar/plugins/explorer [0.1dev]
  launchpad /Users/jszakmeister/Library/Python/2.5/site-packages/bzrlib/plugins/launchpad [1.15]
  netrc_credential_store /Users/jszakmeister/Library/Python/2.5/site-packages/bzrlib/plugins/netrc_credential_store [1.15]
  qbzr /Users/jszakmeister/.bazaar/plugins/qbzr [0.11dev]
  rebase /Users/jszakmeister/.bazaar/plugins/rebase [0.4.2]
  svn /Users/jszakmeister/.bazaar/plugins/svn [0.6.2dev]
<<<<<<<

I was looking at an SVN repository in this case, but I actually discovered the problem trying to browse an unrelated Bazaar repository. It appears the culprit is LogGraphProvider.get_repo_revids(). It's blindly saying that the revs are contained in the local repo, without really knowing that it is. LogList.load_current_dir_repo_if_no_local_repos() is the one pulling in the current working directory. This logic is apparently there to allow log to complete faster by looking at the local repo first... so I'm not sure how to handle this situation, other than to check and see that the local repo and the remote one are related.

Changed in qbzr:
assignee: nobody → Gary van der Merwe (garyvdm)
importance: Undecided → Medium
milestone: none → 0.11.0
summary: - Traceback when trying to browse a remote repository that is unrelated to
- the branch in the current directory
+ qlog remotebranch/file crashes if there are revisions missing in the
+ current directory.
Changed in qbzr:
status: New → 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.