lp:~goneri/bzr-fastimport/goneri merge

Gonéri Le Bouder goneri at rulezlan.org
Wed Aug 19 13:37:25 BST 2009

2009/8/19 Ian Clatworthy <ian.clatworthy at canonical.com>:
> Gonéri Le Bouder wrote:

> Hi,
Hi Ian, thank you for your anwser.

> Thanks for the patch. I'm still trying to understand exactly what the
> bug is that's breaking git-bzr. Is there a stacktrace uploaded somewhere?
The best is to use the test script attached to this bug:
I attached the script and its output.

For the STDIN crash, it's easy to reproduct. Go in a Bzr repository and run:
linda:~/tmp/bzr-temp$echo "" | bzr fast-import -
11:04:19 Updating branch information ...
bzr: ERROR: exceptions.KeyError: None

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line
835, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line
1030, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line
647, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/home/goneri/.bazaar/plugins/fastimport/__init__.py", line 312, in run
    params, verbose)
  File "/home/goneri/.bazaar/plugins/fastimport/__init__.py", line 103, in _run
    return proc.process(p.iter_commands)
  File "/home/goneri/.bazaar/plugins/fastimport/processor.py", line
92, in process
  File "/home/goneri/.bazaar/plugins/fastimport/processors/generic_processor.py",
line 274, in _process
    processor.ImportProcessor._process(self, command_iter)
  File "/home/goneri/.bazaar/plugins/fastimport/processor.py", line
118, in _process
  File "/home/goneri/.bazaar/plugins/fastimport/processors/generic_processor.py",
line 294, in post_process
    branches_updated, branches_lost = updater.update()
  File "/home/goneri/.bazaar/plugins/fastimport/branch_updater.py",
line 60, in update
    branch_tips, lost_heads = self._get_matching_branches()
  File "/home/goneri/.bazaar/plugins/fastimport/branch_updater.py",
line 81, in _get_matching_branches
    default_tip = self.heads_by_ref[trunk][0]
KeyError: None

bzr 1.17 on python 2.5.4 (linux2)
arguments: ['/usr/bin/bzr', 'fast-import', '-']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'fr_FR.UTF-8'
/usr/lib/python2.5/site-packages/bzrlib/plugins/bzrtools [1.17]
  fastimport           /home/goneri/.bazaar/plugins/fastimport [0.9dev]
/usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad [1.17]
/usr/lib/python2.5/site-packages/bzrlib/plugins/rebase [0.5.3]
*** Bazaar has encountered an internal error.
    Please report a bug at https://bugs.launchpad.net/bzr/+filebug
    including this traceback, and a description of what you
    were doing when the error occurred.

> There seems to be two bits to this patch:
Yes you're right.

> I'd like to break those out into two separate merge proposals. The first
> one looks much easier to make a decision on and we can hopefully resolve
> it quickly.

> ... 'from' and 'merge' (for example) take
> "committish" as a parameter, not always a mark (":idref"). And most of
> the other changes seem to flow directly from these changes to the parser?
Oh! That's something I missed. Think you for pointing that. So, yes,
my invasive patch is pointless.

> BTW, a lot of the fastimport code is used by Greg Ward in hg-fastimport
> so we'll need to include him in the loop on any changes to parser.py and
> commands.py for example. See
> https://code.launchpad.net/~gward/bzr-fastimport/reusable.

IFAIR the problem come from self.cache_mgr.revision_ids. It has
key/val where key are integer where it's supposed to be :idref.

I pushed another branch with a very minimalist patch.

Best regards,

    Gonéri Le Bouder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: output.log
Type: application/octet-stream
Size: 5057 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20090819/aad4f4de/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: script.sh
Type: application/x-sh
Size: 647 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20090819/aad4f4de/attachment.sh 

More information about the bazaar mailing list