Comment 23 for bug 541626

Revision history for this message
Valentin Lab (vaab) wrote :

I'm using git-bzr-ng, that uses bzr and bzr-fastimport.
I'm using last commit version of bzr (2.5.0dev2, rev no: 6174) and bzr-fastimport (0.12, rev no: 332) as of 28 September 2011.

git-bzr-ng will issue 2 command in one of its process. The first will run flawlessly, the second will trigger the exception.

Here are both commands:

   bzr fast-import --import-marks=MY_PYTHON_DIR/bzrprojectrepo/.git/bzr/map/master-bzr --export-marks=MY_PYTHON_DIR/bzrprojectrepo/.git/bzr/map/mybranch-name-bzr - MY_PYTHON_DIR/bzrprojectrepo/.git/bzr/repo/mybranch-name
   git fast-export -M --import-marks=MY_PYTHON_DIR/bzrprojectrepo/.git/bzr/map/master-git --export-marks=MY_PYTHON_DIR/bzrprojectrepo/.git/bzr/map/mybranch-name-git mybranch-name

Last command triggers the exception with this trackback:

Traceback (most recent call last):
  File "bzrlib/commands.py", line 924, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "bzrlib/commands.py", line 1124, in run_bzr
    ret = run(*run_argv)
  File "bzrlib/commands.py", line 677, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "bzrlib/commands.py", line 699, in run
    return self._operation.run_simple(*args, **kwargs)
  File "bzrlib/cleanup.py", line 135, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "bzrlib/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "bzrlib/plugins/fastimport/cmds.py", line 314, in run
    user_map=user_map)
  File "bzrlib/plugins/fastimport/cmds.py", line 40, in _run
    return proc.process(p.iter_commands)
  File "bzrlib/plugins/fastimport/processors/generic_processor.py", line 311, in process
    super(GenericProcessor, self)._process(command_iter)
  File "fastimport/processor.py", line 76, in _process
    handler(self, cmd)
  File "bzrlib/plugins/fastimport/processors/generic_processor.py", line 536, in commit_handler
    handler.process()
  File "fastimport/processor.py", line 159, in process
    self.post_process_files()
  File "bzrlib/plugins/fastimport/bzr_commit_handler.py", line 673, in post_process_files
    self._get_inventories)
  File "bzrlib/plugins/fastimport/revision_store.py", line 376, in load_using_delta
    rev.parent_ids)
  File "bzrlib/decorators.py", line 154, in read_locked
    result = unbound(self, *args, **kwargs)
  File "bzrlib/vf_repository.py", line 1843, in get_known_graph_ancestry
    known_graph = self.revisions.get_known_graph_ancestry(revision_keys)
  File "bzrlib/versionedfile.py", line 1440, in get_known_graph_ancestry
    parent_map, missing_keys = self._index.find_ancestry(keys)
  File "bzrlib/groupcompress.py", line 2103, in find_ancestry
    return self._graph_index.find_ancestry(keys, 0)
  File "bzrlib/index.py", line 1527, in find_ancestry
    search_keys = index._find_ancestors(search_keys,
AttributeError: 'BTreeBuilder' object has no attribute '_find_ancestors'

I can confirm that copying the method BTreeGraphIndex._find_ancestor(..) on BTreeBuilder will REMOVE the exception and solve the bug.