bzr fast-import does not implement deleteall

Bug #285941 reported by Miklos Vajna
2
Affects Status Importance Assigned to Milestone
Bazaar Fast Import
Fix Released
Undecided
Ian Clatworthy

Bug Description

Hello,

I'm trying to bzr fast-import the output of darcs-fast-export (http://vmiklos.hu/project/darcs-fast-export/).

git fast-import can correctly import the file, but bzr fast-import gives the following error:

$ cat ../test.fi |bzr fast-import -
16:04:07 progress [2008-10-19 13:35:27] getting list of patches
16:04:07 progress [2008-10-19 13:35:27] encoding is not utf8, guessing charset
16:04:07 progress [2008-10-19 13:35:27] detected encoding is ISO-8859-2
bzr: ERROR: exceptions.NotImplementedError: <bound method GenericCommitHandler.deleteall_handler of <bzrlib.plugins.fastimport.processors.generic_processor.GenericCommitHandler object at 0x998182c>>

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 857, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 797, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 499, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/fastimport/__init__.py", line 199, in run
    params, verbose)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/fastimport/__init__.py", line 77, in _run
    return proc.process(p.iter_commands)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/fastimport/processor.py", line 83, in process
    self._process(command_iter)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/fastimport/processors/generic_processor.py", line 317, in _process
    processor.ImportProcessor._process(self, command_iter)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/fastimport/processor.py", line 105, in _process
    handler(self, cmd)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/fastimport/processors/generic_processor.py", line 486, in commit_handler
    handler.process()
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/fastimport/processor.py", line 170, in process
    handler(self, fc)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/fastimport/processors/generic_processor.py", line 812, in deleteall_handler
    raise NotImplementedError(self.deleteall_handler)
NotImplementedError: <bound method GenericCommitHandler.deleteall_handler of <bzrlib.plugins.fastimport.processors.generic_processor.GenericCommitHandler object at 0x998182c>>

bzr 1.7.1 on python 2.5.2 (linux2)
arguments: ['/usr/bin/bzr', 'fast-import', '-']
encoding: 'ISO-8859-2', fsenc: 'ISO-8859-2', lang: 'hu_HU'
plugins:
  etckeeper /usr/lib/python2.5/site-packages/bzrlib/plugins/etckeeper [unknown]
  fastimport /usr/lib/python2.5/site-packages/bzrlib/plugins/fastimport [unknown]
  launchpad /usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad [unknown]
  rebase /usr/lib/python2.5/site-packages/bzrlib/plugins/rebase [0.4.0dev0]
*** 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 seems that the 'deleteall' command is not implemented in bzr fast-import.

Thanks!

Related branches

Revision history for this message
Miklos Vajna (vmiklos) wrote :
Revision history for this message
Miklos Vajna (vmiklos) wrote :

Here is a patch to implement the requested feature.

Revision history for this message
Ian Clatworthy (ian-clatworthy) wrote :

Attached patch merged into trunk now.

Changed in bzr-fastimport:
assignee: nobody → ian-clatworthy
status: New → Fix Committed
Revision history for this message
Ian Clatworthy (ian-clatworthy) wrote :

Miklos,

Looking closer at this patch, I think it needs some tweaking to support a stream with multiple branches. I've made a change accordingly. Can you please test rev 110 and confirm that my change still works for you as required?

I'll also upload some sample data with multiple branches if you're interested. I derived this from your sample data. Rev 109 falls over on that data while rev 110 seems to work ok now.

Revision history for this message
Ian Clatworthy (ian-clatworthy) wrote :
Revision history for this message
Miklos Vajna (vmiklos) wrote :

I just tested 'revision 112' and it works fine, thanks.

Changed in bzr-fastimport:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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