affects bzr
tags packs
mbp@grace% ~/old/bzr.20071017/pack-repository/bzr -Dfetch branch http://people.ubuntu.com/~robertc/baz2.0/repository
bzr: ERROR: exceptions.IndexError: tuple index out of range
Traceback (most recent call last):
File "/home/mbp/old/bzr.20071017/pack-repository/bzrlib/commands.py", line 802, in run_bzr_catch_errors
return run_bzr(argv)
File "/home/mbp/old/bzr.20071017/pack-repository/bzrlib/commands.py", line 758, in run_bzr
ret = run(*run_argv)
File "/home/mbp/old/bzr.20071017/pack-repository/bzrlib/commands.py", line 492, in run_argv_aliases
return self.run(**all_cmd_args)
File "/home/mbp/old/bzr.20071017/pack-repository/bzrlib/builtins.py", line 893, in run
possible_transports=[to_transport])
File "/home/mbp/old/bzr.20071017/pack-repository/bzrlib/bzrdir.py", line 835, in sprout
wt = result.create_workingtree()
File "/home/mbp/old/bzr.20071017/pack-repository/bzrlib/bzrdir.py", line 1106, in create_workingtree
return self._format.workingtree_format.initialize(self, revision_id)
File "/home/mbp/old/bzr.20071017/pack-repository/bzrlib/workingtree_4.py", line 1299, in initialize
transform.build_tree(basis, wt)
File "/home/mbp/old/bzr.20071017/pack-repository/bzrlib/transform.py", line 1265, in build_tree
return _build_tree(tree, wt)
File "/home/mbp/old/bzr.20071017/pack-repository/bzrlib/transform.py", line 1348, in _build_tree
tree.iter_files_bytes(deferred_contents)):
File "/home/mbp/old/bzr.20071017/pack-repository/bzrlib/repository.py", line 1132, in iter_files_bytes
yield callable_data, weave.get_lines(revision_id)
File "/home/mbp/old/bzr.20071017/pack-repository/bzrlib/knit.py", line 942, in get_lines
return self.get_line_list([version_id])[0]
File "/home/mbp/old/bzr.20071017/pack-repository/bzrlib/knit.py", line 977, in get_line_list
text_map, content_map = self._get_content_maps(version_ids)
File "/home/mbp/old/bzr.20071017/pack-repository/bzrlib/knit.py", line 989, in _get_content_maps
record_map = self._get_record_map(version_ids)
File "/home/mbp/old/bzr.20071017/pack-repository/bzrlib/knit.py", line 955, in _get_record_map
position_map = self._get_components_positions(version_ids)
File "/home/mbp/old/bzr.20071017/pack-repository/bzrlib/knit.py", line 800, in _get_components_positions
next = self.get_parents(cursor)[0]
IndexError: tuple index out of range
bzr 0.92.0.dev.0 on python 2.5.1.final.0 (linux2)
arguments: ['/home/mbp/old/bzr.20071017/pack-repository/bzr', '-Dfetch', 'branch', 'http://people.ubuntu.com/~robertc/baz2.0/repository']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_AU.UTF-8'
plugins:
gtk /home/mbp/.bazaar/plugins/gtk [0.91.0]
launchpad /home/mbp/old/bzr.20071017/pack-repository/bzrlib/plugins/launchpad [unknown]
multiparent /home/mbp/old/bzr.20071017/pack-repository/bzrlib/plugins/multiparent.pyc [unknown]
pqm /home/mbp/.bazaar/plugins/pqm [unknown]
** Please send this report to <email address hidden>
with a description of what you were doing when the
error occurred.
zsh: exit 4 ~/old/bzr.20071017/pack-repository/bzr -Dfetch branch
~/old/bzr.20071017/pack-repository/bzr -Dfetch branch 102.22s user 1.61s system 14% cpu 12:00.04 total
This was pulling from the branch shown above into a newly initialized
repository, then trying to extract the tree from it.
--
Martin
I'm not following this closely but I thought I'd mention a bit of diagnosis. I think the lines in question are:
method = self._index. get_method( cursor)
next = None
else:
next = self.get_ parents( cursor) [0]
if method == 'fulltext':
Which would indicate that we have a record with no parents that is not marked as a fulltext. This shouldn't be possible because we don't have anything to delta against if we don't have any parents. (So it should *have* to be a fulltext).
It may be that Packs change that logic, though I'm not sure how. We certainly could do:
parents = self.get_ parents( cursor)
if not parents:
next = parents[0]
However, that would miss the case where we have the fulltext cached *and* parents. And it seems like a data corruption to have no parents but no fulltext.
Could it just be that http:// people. ubuntu. com/~robertc/ baz2.0/ repository is broken?