Comment 1 for bug 661553

Revision history for this message
Chris Osborn (chris-osborn) wrote :

I looked a little closer and found that the invalid reference to "retcode" occurs in the finally portion of a try block, and that retcode is not set because an exception is thrown earlier. Initializing retcode and trying again reveals the actual error. Although the output claims that the export completed successfully, the resulting file is incomplete.

mbp:~ csosborn$ bzr fast-export-from-p4 //depot/web/main main.fi
Export to main.fi completed successfully.
bzr: ERROR: exceptions.IndexError: list index out of range

Traceback (most recent call last):
  File "/Library/Python/2.6/site-packages/bzrlib/commands.py", line 911, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/Library/Python/2.6/site-packages/bzrlib/commands.py", line 1111, in run_bzr
    ret = run(*run_argv)
  File "/Library/Python/2.6/site-packages/bzrlib/commands.py", line 689, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/Library/Python/2.6/site-packages/bzrlib/commands.py", line 704, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/Library/Python/2.6/site-packages/bzrlib/cleanup.py", line 135, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/Library/Python/2.6/site-packages/bzrlib/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/Library/Python/2.6/site-packages/bzrlib/plugins/fastimport/__init__.py", line 903, in run
    fast_export_from(source, destination, 'p4', verbose, custom)
  File "/Library/Python/2.6/site-packages/bzrlib/plugins/fastimport/exporters/__init__.py", line 328, in fast_export_from
    custom=custom)
  File "/Library/Python/2.6/site-packages/bzrlib/plugins/fastimport/exporters/__init__.py", line 281, in generate
    retcode = p4_fast_export.main([source])
  File "/Library/Python/2.6/site-packages/bzrlib/plugins/bzrp4/p4_fast_export.py", line 10, in main
    return git_p4.main(['export'] + args)
  File "/Library/Python/2.6/site-packages/bzrlib/plugins/bzrp4/git_p4.py", line 1899, in main
    if not cmd.run(args):
  File "/Library/Python/2.6/site-packages/bzrlib/plugins/bzrp4/git_p4.py", line 1740, in run
    if not P4Sync.run(self, depotPaths):
  File "/Library/Python/2.6/site-packages/bzrlib/plugins/bzrp4/git_p4.py", line 1534, in run
    self.importHeadRevision(revision)
  File "/Library/Python/2.6/site-packages/bzrlib/plugins/bzrp4/git_p4.py", line 1334, in importHeadRevision
    self.commit(details, self.extractFilesFromCommit(details), self.branch, self.depotPaths)
  File "/Library/Python/2.6/site-packages/bzrlib/plugins/bzrp4/git_p4.py", line 937, in commit
    data = file.get_data(p4)
  File "/Library/Python/2.6/site-packages/bzrlib/plugins/bzrp4/git_p4.py", line 1802, in get_data
    stat = filedata[0]
IndexError: list index out of range

bzr 2.2.0 on python 2.6.1 (Darwin-10.4.0-i386-64bit)
arguments: ['/usr/local/bin/bzr', 'fast-export-from-p4', '//depot/web/main/sks/packages/sitelier-sks', 'sks.fi']
encoding: 'UTF-8', fsenc: 'utf-8', lang: 'en_US.UTF-8'
plugins:
  bash_completion /Library/Python/2.6/site-packages/bzrlib/plugins/bash_completion [2.2.0]
  bzrp4 /Library/Python/2.6/site-packages/bzrlib/plugins/bzrp4 [unknown]
  bzrtools /Library/Python/2.6/site-packages/bzrlib/plugins/bzrtools [2.2.0]
  colo /Library/Python/2.6/site-packages/bzrlib/plugins/colo [0.1.0]
  email /Library/Python/2.6/site-packages/bzrlib/plugins/email [unknown]
  explorer /Library/Python/2.6/site-packages/bzrlib/plugins/explorer [1.1.0dev2]
  extmerge /Library/Python/2.6/site-packages/bzrlib/plugins/extmerge [unknown]
  fastimport /Library/Python/2.6/site-packages/bzrlib/plugins/fastimport [0.9.0dev]
  keychain /Library/Python/2.6/site-packages/bzrlib/plugins/keychain [0.1.0]
  launchpad /Library/Python/2.6/site-packages/bzrlib/plugins/launchpad [2.2.0]
  loom /Library/Python/2.6/site-packages/bzrlib/plugins/loom [2.2.1dev]
  netrc_credential_store /Library/Python/2.6/site-packages/bzrlib/plugins/netrc_credential_store [2.2.0]
  news_merge /Library/Python/2.6/site-packages/bzrlib/plugins/news_merge [2.2.0]
  pipeline /Library/Python/2.6/site-packages/bzrlib/plugins/pipeline [unknown]
  qbzr /Library/Python/2.6/site-packages/bzrlib/plugins/qbzr [0.20.0dev1]
  rewrite /Library/Python/2.6/site-packages/bzrlib/plugins/rewrite [0.6.0]
  svn /Library/Python/2.6/site-packages/bzrlib/plugins/svn [1.0.4dev]
  upload /Library/Python/2.6/site-packages/bzrlib/plugins/upload [1.0.0dev]
  xmloutput /Library/Python/2.6/site-packages/bzrlib/plugins/xmloutput [0.8.6]

*** Bazaar has encountered an internal error. This probably indicates a
    bug in Bazaar. You can help us fix it by filing a bug report at
        https://bugs.launchpad.net/bzr/+filebug
    including this traceback and a description of the problem.