Comment 2 for bug 515651

Revision history for this message
Josh Brown (joshbrown) wrote : Re: qdiff: refresh crashes after a commit.

I've just received a similar error when I opened a diff, made a commit, then refreshed the diff.

bzr: ERROR: exceptions.ValueError: list.index(x): x not in list

Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/qbzr/lib/diffwindow.py", line 438, in click_refresh
    run_in_loading_queue(self.load_diff)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/qbzr/lib/util.py", line 891, in run_in_loading_queue
    f(*args, **kargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/qbzr/lib/diffwindow.py", line 294, in load_diff
    executable) in sorted(changes, key=changes_key):
  File "/usr/lib/python2.6/dist-packages/bzrlib/tree.py", line 1046, in iter_changes
    lookup_trees, require_versioned=require_versioned)
  File "/usr/lib/python2.6/dist-packages/bzrlib/workingtree_4.py", line 877, in paths2ids
    trees, require_versioned)
  File "/usr/lib/python2.6/dist-packages/bzrlib/tree.py", line 577, in paths2ids
    return find_ids_across_trees(paths, [self] + list(trees), require_versioned)
  File "/usr/lib/python2.6/dist-packages/bzrlib/tree.py", line 804, in find_ids_across_trees
    require_versioned)
  File "/usr/lib/python2.6/dist-packages/bzrlib/tree.py", line 824, in _find_ids_across_trees
    file_id = tree.path2id(tree_path)
  File "/usr/lib/python2.6/dist-packages/bzrlib/decorators.py", line 140, in read_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/workingtree_4.py", line 1895, in path2id
    entry = self._get_entry(path=path)
  File "/usr/lib/python2.6/dist-packages/bzrlib/workingtree_4.py", line 1664, in _get_entry
    parent_index = self._get_parent_index()
  File "/usr/lib/python2.6/dist-packages/bzrlib/workingtree_4.py", line 1647, in _get_parent_index
    return self._dirstate.get_parent_ids().index(self._revision_id) + 1
ValueError: list.index(x): x not in list

bzr 2.1.1 on python 2.6.5 (linux2)
arguments: ['/usr/bin/bzr', 'qdiff', 'snakes']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_GB.utf8'
plugins:
  bzrtools /usr/lib/python2.6/dist-packages/bzrlib/plugins/bzrtools [2.1.0]
  explorer /usr/lib/python2.6/dist-packages/bzrlib/plugins/explorer [1.0.1]
  launchpad /usr/lib/python2.6/dist-packages/bzrlib/plugins/launchpad [2.1.1]
  netrc_credential_store /usr/lib/python2.6/dist-packages/bzrlib/plugins/netrc_credential_store [2.1.1]
  news_merge /usr/lib/python2.6/dist-packages/bzrlib/plugins/news_merge [2.1.1]
  qbzr /usr/lib/python2.6/dist-packages/bzrlib/plugins/qbzr [0.18.6]

The commit I made can be found on Launchpad: lp:~snakes-game/snakes-game/trunk 2.5.1.1 [http://bazaar.launchpad.net/~snakes-game/snakes-game/trunk/revision/25.1.1]

Running:
  qbzr 0.18.6-0ubuntu1
  bzr 2.1.1-1