cvsps-import: AssertionError: Failed to process: 'Branches

Bug #274229 reported by David Reitter
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
CVS to Bazaar importer
Triaged
High
Unassigned

Bug Description

As shown below - the import dies fairly quickly.
I've managed to use cvsps to create a git repository from this one, so in principle it should work...

cvs -v
Concurrent Versions System (CVS) 1.12.13 (client/server)

BRAEBURN:~ dr$ rm -r bzr.aquamacs/
BRAEBURN:~ dr$ bzr cvsps-import cvs aquamacs bzr.aquamacs
Creating cvsps dump file: bzr.aquamacs/staging/aquamacs.dump
branch HEAD not found in global branch hash
Processed 0 patches (0 new, 0 existing) on 0 branches (0 tags) in 11.8s (0.00 patch/s)
bzr: ERROR: exceptions.AssertionError: Failed to process: 'Branches: dr\n'

Traceback (most recent call last):
  File "/Library/Python/2.5/site-packages/bzrlib/commands.py", line 857, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/Library/Python/2.5/site-packages/bzrlib/commands.py", line 797, in run_bzr
    ret = run(*run_argv)
  File "/Library/Python/2.5/site-packages/bzrlib/commands.py", line 499, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/Users/dr/.bazaar/plugins/cvsps_import/__init__.py", line 95, in run
    importer.process()
  File "/Users/dr/.bazaar/plugins/cvsps_import/cvsps/importer.py", line 1266, in process
    patchsets = self._parse_cvsps_dump(pb=pb)
  File "/Users/dr/.bazaar/plugins/cvsps_import/cvsps/importer.py", line 1199, in _parse_cvsps_dump
    patchsets = parser.parse(pb=pb)
  File "/Users/dr/.bazaar/plugins/cvsps_import/cvsps/parser.py", line 262, in parse
    assert False, 'Failed to process: %r' % (line,)
AssertionError: Failed to process: 'Branches: dr\n'

bzr 1.7.1rc1 on python 2.5.1 (darwin)
arguments: ['/usr/local/bin/bzr', 'cvsps-import', 'cvs', 'aquamacs', 'bzr.aquamacs']
encoding: 'US-ASCII', fsenc: 'utf-8', lang: None
plugins:
  cvsps_import /Users/dr/.bazaar/plugins/cvsps_import [unknown]
  fastimport /Users/dr/.bazaar/plugins/fastimport [unknown]
  launchpad /Library/Python/2.5/site-packages/bzrlib/plugins/launchpad [unknown]
*** 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.

description: updated
Revision history for this message
John A Meinel (jameinel) wrote :

cvsps-import doesn't handle the "Branches" field. It should, as it gives more accurate representation of the changes. But that was only added in a new version of cvsps, and nobody has stepped up to write a patch.

Changed in bzr:
importance: Undecided → High
status: New → Triaged
Revision history for this message
Matthew Fuller (fullermd) wrote :

I just got bit by this. Here's a minimal patch that fails utterly to fix the "should handle" problem, but at least fixes the "shouldn't blow up" one:

=== modified file 'cvsps/parser.py'
--- cvsps/parser.py 2007-02-08 22:33:44 +0000
+++ cvsps/parser.py 2009-04-25 07:35:24 +0000
@@ -254,6 +254,10 @@
             if not line or line == '\n':
                 continue

+ # HACK: These lines show up now
+ if line.startswith("Branches:"):
+ continue
+
             for prefix in handlers:
                 if line.startswith(prefix):
                     handlers[prefix](line)

affects: bzr → bzr-cvsps-import
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.