bzr: ERROR: exceptions.NotImplementedError: <bound method ImportParser.read_until of <bzrlib.plugins.fastimport.parser.ImportParser object at 0x9025eec>>

Bug #400960 reported by Samuel Bronson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar Fast Import
Fix Released
Undecided
Unassigned

Bug Description

Hi. The attached file is a greatly shortened version of output from a very slightly modified version of the script named "contrib/import-tars.perl" in the git repository. (The only significant change was essentially to have it run "cat" instead of "git fast-import --quiet".) It was shortened for your convenience; the exact same traceback results from the full file, which I'd be happy to provide, but don't see the point.

It imports fine with git fast-import, but fails to import with bzr:

naesten@hydrogen:~/hacking/scamper% bzr fast-import tiny-import.txt
bzr: ERROR: exceptions.NotImplementedError: <bound method ImportParser.read_until of <bzrlib.plugins.fastimport.parser.ImportParser object at 0x9025eec>>

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/naesten/.bazaar/plugins/fastimport/__init__.py", line 221, in run
    params, verbose)
  File "/home/naesten/.bazaar/plugins/fastimport/__init__.py", line 75, in _run
    return proc.process(p.iter_commands)
  File "/home/naesten/.bazaar/plugins/fastimport/processor.py", line 92, in process
    self._process(command_iter)
  File "/home/naesten/.bazaar/plugins/fastimport/processors/generic_processor.py", line 269, in _process
    processor.ImportProcessor._process(self, command_iter)
  File "/home/naesten/.bazaar/plugins/fastimport/processor.py", line 107, in _process
    for cmd in command_iter():
  File "/home/naesten/.bazaar/plugins/fastimport/parser.py", line 273, in iter_commands
    yield self._parse_commit(line[len('commit '):])
  File "/home/naesten/.bazaar/plugins/fastimport/parser.py", line 330, in _parse_commit
    message = self._get_data('commit', 'message')
  File "/home/naesten/.bazaar/plugins/fastimport/parser.py", line 437, in _get_data
    return self.read_until(rest[2:])
  File "/home/naesten/.bazaar/plugins/fastimport/parser.py", line 237, in read_until
    raise NotImplementedError(self.read_until)
NotImplementedError: <bound method ImportParser.read_until of <bzrlib.plugins.fastimport.parser.ImportParser object at 0x9025eec>>

bzr 1.18dev on python 2.5.4 (linux2)
arguments: ['/usr/bin/bzr', 'fast-import', 'tiny-import.txt']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  bisect /home/naesten/.bazaar/plugins/bisect [1.1.0.pre.0]
  bzrtools /usr/lib/python2.5/site-packages/bzrlib/plugins/bzrtools [1.18]
  fastimport /home/naesten/.bazaar/plugins/fastimport [0.8dev]
  git /home/naesten/.bazaar/plugins/git [0.4.1dev]
  launchpad /usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad [1.18dev]
  netrc_credential_store /usr/lib/python2.5/site-packages/bzrlib/plugins/netrc_credential_store [1.18dev]
  push_and_update /home/naesten/.bazaar/plugins/push_and_update [0.2dev]
  repo_push /home/naesten/.bazaar/plugins/repo_push [1.1]
  svn /home/naesten/.bazaar/plugins/svn [0.6.3dev]
*** 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.

It looks like you may have forgotten to implement or test here-document input for tag and commit messages, which is apparently defined in the production:

  delimited_data ::= 'data' sp '<<' delim lf
    (data_line lf)*
    delim lf;

(as found in the concerned module's docstring).

I may have a go at fixing this tomorrow if nobody beats me to it.

Related branches

Revision history for this message
Samuel Bronson (naesten) wrote :
Changed in bzr-fastimport:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.