fastimport from git fails

Bug #287767 reported by David Reitter
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar Fast Import
Fix Released
Undecided
Unassigned

Bug Description

Importing from git via "fast-import" doesn't work.
I have installed a current checkout of the fastimport plugin.

BRAEBURN:bzr.aquamacs dr$ cat ~/repo.exported | bzr fast-import -
bzr: ERROR: exceptions.KeyError: None

Traceback (most recent call last):
  File "/Library/Python/2.5/site-packages/bzrlib/commands.py", line 849, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/Library/Python/2.5/site-packages/bzrlib/commands.py", line 795, in run_bzr
    ret = run(*run_argv)
  File "/Library/Python/2.5/site-packages/bzrlib/commands.py", line 495, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/Users/dr/.bazaar/plugins/fastimport/__init__.py", line 199, in run
    params, verbose)
  File "/Users/dr/.bazaar/plugins/fastimport/__init__.py", line 77, in _run
    return proc.process(p.iter_commands)
  File "/Users/dr/.bazaar/plugins/fastimport/processor.py", line 83, in process
    self._process(command_iter)
  File "/Users/dr/.bazaar/plugins/fastimport/processors/generic_processor.py", line 317, in _process
    processor.ImportProcessor._process(self, command_iter)
  File "/Users/dr/.bazaar/plugins/fastimport/processor.py", line 105, in _process
    handler(self, cmd)
  File "/Users/dr/.bazaar/plugins/fastimport/processors/generic_processor.py", line 546, in reset_handler
    self._set_tag(cmd.ref[len('refs/tags/'):], cmd.from_)
  File "/Users/dr/.bazaar/plugins/fastimport/processors/generic_processor.py", line 558, in _set_tag
    bzr_rev_id = self.cache_mgr.revision_ids[from_]
KeyError: None

bzr 1.8 on python 2.5.1 (darwin)
arguments: ['/usr/local/bin/bzr', 'fast-import', '-']
encoding: 'UTF-8', fsenc: 'utf-8', lang: 'en_US.UTF-8'
plugins:
  bzrtools /Library/Python/2.5/site-packages/bzrlib/plugins/bzrtools [1.8.0]
  cvsps_import /Users/dr/.bazaar/plugins/cvsps_import [unknown]
  email /Library/Python/2.5/site-packages/bzrlib/plugins/email [unknown]
  extmerge /Library/Python/2.5/site-packages/bzrlib/plugins/extmerge [unknown]
  fastimport /Users/dr/.bazaar/plugins/fastimport [unknown]
  launchpad /Library/Python/2.5/site-packages/bzrlib/plugins/launchpad [unknown]
  loom /Library/Python/2.5/site-packages/bzrlib/plugins/loom [1.4.0dev0]
  qbzr /Library/Python/2.5/site-packages/bzrlib/plugins/qbzr [0.9.4]
  rebase /Library/Python/2.5/site-packages/bzrlib/plugins/rebase [0.4.0dev0]
  search /Library/Python/2.5/site-packages/bzrlib/plugins/search [1.7.0dev0]
  svn /Library/Python/2.5/site-packages/bzrlib/plugins/svn [0.4.13]
  upload /Library/Python/2.5/site-packages/bzrlib/plugins/upload [0.1.1]
*** 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.

.bzr.log:

0.045 encoding stdout as sys.stdout encoding 'US-ASCII'
0.047 bzr arguments: [u'fast-import', u'-']
0.047 looking for plugins in /Users/dr/.bazaar/plugins
0.130 looking for plugins in /Library/Python/2.5/site-packages/bzrlib/plugins
0.130 Plugin name __init__ already loaded
0.130 Plugin name __init__ already loaded
0.148 bzr-svn: using Subversion 1.4.4 ()
0.249 encoding stdout as sys.stdout encoding 'US-ASCII'
0.313 opening working tree '/Users/dr/bzr.aquamacs'
0.510 Traceback (most recent call last):
  File "/Library/Python/2.5/site-packages/bzrlib/commands.py", line 849, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/Library/Python/2.5/site-packages/bzrlib/commands.py", line 795, in run_bzr
    ret = run(*run_argv)
  File "/Library/Python/2.5/site-packages/bzrlib/commands.py", line 495, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/Users/dr/.bazaar/plugins/fastimport/__init__.py", line 199, in run
    params, verbose)
  File "/Users/dr/.bazaar/plugins/fastimport/__init__.py", line 77, in _run
    return proc.process(p.iter_commands)
  File "/Users/dr/.bazaar/plugins/fastimport/processor.py", line 83, in process
    self._process(command_iter)
  File "/Users/dr/.bazaar/plugins/fastimport/processors/generic_processor.py", line 317, in _process
    processor.ImportProcessor._process(self, command_iter)
  File "/Users/dr/.bazaar/plugins/fastimport/processor.py", line 105, in _process
    handler(self, cmd)
  File "/Users/dr/.bazaar/plugins/fastimport/processors/generic_processor.py", line 546, in reset_handler
    self._set_tag(cmd.ref[len('refs/tags/'):], cmd.from_)
  File "/Users/dr/.bazaar/plugins/fastimport/processors/generic_processor.py", line 558, in _set_tag
    bzr_rev_id = self.cache_mgr.revision_ids[from_]
KeyError: None

0.512 return code 4

I tried the same going via some xxx.cfg file (following the fast-import doc). This gives a different, possibly unrelated error message.

bzr: ERROR: bzrlib.util.configobj.configobj.ParseError: Parse error in value at line 39.

Traceback (most recent call last):
  File "/Library/Python/2.5/site-packages/bzrlib/commands.py", line 849, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/Library/Python/2.5/site-packages/bzrlib/commands.py", line 795, in run_bzr
    ret = run(*run_argv)
  File "/Library/Python/2.5/site-packages/bzrlib/commands.py", line 495, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/Users/dr/.bazaar/plugins/fastimport/__init__.py", line 199, in run
    params, verbose)
  File "/Users/dr/.bazaar/plugins/fastimport/__init__.py", line 77, in _run
    return proc.process(p.iter_commands)
  File "/Users/dr/.bazaar/plugins/fastimport/processor.py", line 83, in process
    self._process(command_iter)
  File "/Users/dr/.bazaar/plugins/fastimport/processors/generic_processor.py", line 317, in _process
    processor.ImportProcessor._process(self, command_iter)
  File "/Users/dr/.bazaar/plugins/fastimport/processor.py", line 97, in _process
    self.pre_process()
  File "/Users/dr/.bazaar/plugins/fastimport/processors/generic_processor.py", line 199, in pre_process
    self._load_info_and_params()
  File "/Users/dr/.bazaar/plugins/fastimport/processors/generic_processor.py", line 273, in _load_info_and_params
    self.info = configobj.ConfigObj(info_path)
  File "/Library/Python/2.5/site-packages/bzrlib/util/configobj/configobj.py", line 1276, in __init__
    self._load(infile, configspec)
  File "/Library/Python/2.5/site-packages/bzrlib/util/configobj/configobj.py", line 1359, in _load
    raise error
ParseError: Parse error in value at line 39.

bzr 1.8 on python 2.5.1 (darwin)
arguments: ['/usr/local/bin/bzr', 'fast-import', '/Users/dr/repo.exported', '--info', 'xxx.cfg']
encoding: 'UTF-8', fsenc: 'utf-8', lang: 'en_US.UTF-8'
plugins:
  bzrtools /Library/Python/2.5/site-packages/bzrlib/plugins/bzrtools [1.8.0]
  cvsps_import /Users/dr/.bazaar/plugins/cvsps_import [unknown]
  email /Library/Python/2.5/site-packages/bzrlib/plugins/email [unknown]
  extmerge /Library/Python/2.5/site-packages/bzrlib/plugins/extmerge [unknown]
  fastimport /Users/dr/.bazaar/plugins/fastimport [unknown]
  launchpad /Library/Python/2.5/site-packages/bzrlib/plugins/launchpad [unknown]
  loom /Library/Python/2.5/site-packages/bzrlib/plugins/loom [1.4.0dev0]
  qbzr /Library/Python/2.5/site-packages/bzrlib/plugins/qbzr [0.9.4]
  rebase /Library/Python/2.5/site-packages/bzrlib/plugins/rebase [0.4.0dev0]
  search /Library/Python/2.5/site-packages/bzrlib/plugins/search [1.7.0dev0]
  svn /Library/Python/2.5/site-packages/bzrlib/plugins/svn [0.4.13]
  upload /Library/Python/2.5/site-packages/bzrlib/plugins/upload [0.1.1]
*** 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.

Revision history for this message
David Reitter (david-reitter) wrote :
Revision history for this message
David Reitter (david-reitter) wrote :

Apologies for the large attachment. I canceled the transfer when I noticed it was this big, but it appears to have been sent alright.

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

I believe this is now fixed in the latest bzr-fastimport trunk (rev 108).

I'm not sure about the failure to parse the cfg file. Perhaps you left off the -v flag when running fast-import-info? Otherwise, please attach the cfg file generated and reopen this issue.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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